Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3052)

Unified Diff: sky/examples/stocks2/lib/stock_arrow.dart

Issue 1174023003: Remove one more use of mirrors: Components now have to explicitly sync their fields. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/examples/stocks2/lib/stock_list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
+
}
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/examples/stocks2/lib/stock_list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698