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

Unified Diff: sky/examples/stocks2/lib/stock_row.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_menu.dart ('k') | sky/sdk/lib/framework/components2/animated_component.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks2/lib/stock_row.dart
diff --git a/sky/examples/stocks2/lib/stock_row.dart b/sky/examples/stocks2/lib/stock_row.dart
index 4aea39c11b7b0789ef0c432cb87b3b2f58293dc9..6df131c520f8334c705ffcb64cb409a495e37867 100644
--- a/sky/examples/stocks2/lib/stock_row.dart
+++ b/sky/examples/stocks2/lib/stock_row.dart
@@ -12,13 +12,12 @@ import 'stock_arrow.dart';
import 'stock_data.dart';
class StockRow extends Component {
- static const double kHeight = 70.0;
- Stock stock;
+ StockRow({ Stock stock }) : this.stock = stock, super(key: stock.symbol);
- StockRow({ Stock stock }) : super(key: stock.symbol) {
- this.stock = stock;
- }
+ final Stock stock;
+
+ static const double kHeight = 70.0;
UINode build() {
String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}";
« no previous file with comments | « sky/examples/stocks2/lib/stock_menu.dart ('k') | sky/sdk/lib/framework/components2/animated_component.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698