From 49fb4923324ccddaeb69616bd83d5c3a10667023 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 20 Nov 2015 09:36:12 -0800 Subject: [PATCH] Fix crash in stocks app painting --- examples/stocks/lib/stock_arrow.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/stocks/lib/stock_arrow.dart b/examples/stocks/lib/stock_arrow.dart index ebc9ec909d..6dfb3056bf 100644 --- a/examples/stocks/lib/stock_arrow.dart +++ b/examples/stocks/lib/stock_arrow.dart @@ -15,7 +15,7 @@ class StockArrowPainter extends CustomPainter { paint.strokeWidth = 1.0; const double padding = 2.0; assert(padding > paint.strokeWidth / 2.0); // make sure the circle remains inside the box - double r = (size - padding) / 2.0; // radius of the circle + double r = (size.shortestSide - padding) / 2.0; // radius of the circle double centerX = padding + r; double centerY = padding + r;