Index: sky/examples/stocks2/lib/stock_arrow.dart |
diff --git a/sky/examples/stocks2/lib/stock_arrow.dart b/sky/examples/stocks2/lib/stock_arrow.dart |
index a13cbe41998f85a7a469a334fc2c0fd2e41295cc..3f2bab6ff2fbc7b1bc2b5edfdedf5600e67336c0 100644 |
--- a/sky/examples/stocks2/lib/stock_arrow.dart |
+++ b/sky/examples/stocks2/lib/stock_arrow.dart |
@@ -12,10 +12,11 @@ import 'dart:math' as math; |
import 'dart:sky' as sky; |
class StockArrow extends Component { |
- double percentChange; |
StockArrow({ Object key, this.percentChange }) : super(key: key); |
+ final double percentChange; |
+ |
int _colorIndexForPercentChange(double percentChange) { |
double maxPercent = 10.0; |
double normalizedPercentChange = math.min(percentChange.abs(), maxPercent) / maxPercent; |
@@ -71,4 +72,5 @@ class StockArrow extends Component { |
height: size, |
margin: const EdgeDims.symmetric(horizontal: 5.0)); |
} |
+ |
} |