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

Side by Side Diff: sky/examples/stocks/lib/stock_row.dart

Issue 1043283003: [Effen] s/Node/UINode/, s/Element/WrapperNode/, s/EventTarget/EventListenerNode/ (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « sky/examples/stocks/lib/stock_menu.dart ('k') | sky/examples/widgets/widgets_app.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'package:sky/framework/components/ink_well.dart'; 5 import 'package:sky/framework/components/ink_well.dart';
6 import 'package:sky/framework/fn.dart'; 6 import 'package:sky/framework/fn.dart';
7 import 'package:sky/framework/theme/typography.dart' as typography; 7 import 'package:sky/framework/theme/typography.dart' as typography;
8 import 'stock_arrow.dart'; 8 import 'stock_arrow.dart';
9 import 'stock_data.dart'; 9 import 'stock_data.dart';
10 10
(...skipping 21 matching lines...) Expand all
32 ${typography.black.caption}; 32 ${typography.black.caption};
33 text-align: right;''' 33 text-align: right;'''
34 ); 34 );
35 35
36 Stock stock; 36 Stock stock;
37 37
38 StockRow({Stock stock}) : super(key: stock.symbol) { 38 StockRow({Stock stock}) : super(key: stock.symbol) {
39 this.stock = stock; 39 this.stock = stock;
40 } 40 }
41 41
42 Node build() { 42 UINode build() {
43 String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}"; 43 String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}";
44 44
45 String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%"; 45 String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%";
46 if (stock.percentChange > 0) 46 if (stock.percentChange > 0)
47 changeInPrice = "+" + changeInPrice; 47 changeInPrice = "+" + changeInPrice;
48 48
49 List<Node> children = [ 49 List<UINode> children = [
50 new StockArrow( 50 new StockArrow(
51 percentChange: stock.percentChange 51 percentChange: stock.percentChange
52 ), 52 ),
53 new Container( 53 new Container(
54 key: 'Ticker', 54 key: 'Ticker',
55 style: _tickerStyle, 55 style: _tickerStyle,
56 children: [new Text(stock.symbol)] 56 children: [new Text(stock.symbol)]
57 ), 57 ),
58 new Container( 58 new Container(
59 key: 'LastSale', 59 key: 'LastSale',
60 style: _lastSaleStyle, 60 style: _lastSaleStyle,
61 children: [new Text(lastSale)] 61 children: [new Text(lastSale)]
62 ), 62 ),
63 new Container( 63 new Container(
64 key: 'Change', 64 key: 'Change',
65 style: _changeStyle, 65 style: _changeStyle,
66 children: [new Text(changeInPrice)] 66 children: [new Text(changeInPrice)]
67 ) 67 )
68 ]; 68 ];
69 69
70 return new StyleNode(new InkWell(children: children), _style); 70 return new StyleNode(new InkWell(children: children), _style);
71 } 71 }
72 } 72 }
OLDNEW
« no previous file with comments | « sky/examples/stocks/lib/stock_menu.dart ('k') | sky/examples/widgets/widgets_app.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698