Fix crash in stocks app painting

This commit is contained in:
Adam Barth
2015-11-20 09:36:12 -08:00
parent ba8f6a0188
commit 49fb492332

View File

@@ -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;