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

Side by Side Diff: sky/examples/stocks-fn/stockrow.dart

Issue 1006053002: Allow Effen Styles to be extendable (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: sdfsd Created 5 years, 9 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-fn/stockarrow.dart ('k') | sky/examples/stocks-fn/stocksapp.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 part of stocksapp; 1 part of stocksapp;
2 2
3 class StockRow extends Component { 3 class StockRow extends Component {
4 4
5 Stock stock; 5 Stock stock;
6 6
7 static Style _style = new Style(''' 7 static Style _style = new Style('''
8 transform: translateX(0); 8 transform: translateX(0);
9 display: flex; 9 display: flex;
10 align-items: center; 10 align-items: center;
(...skipping 29 matching lines...) Expand all
40 String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%"; 40 String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%";
41 if (stock.percentChange > 0) 41 if (stock.percentChange > 0)
42 changeInPrice = "+" + changeInPrice; 42 changeInPrice = "+" + changeInPrice;
43 43
44 List<Node> children = [ 44 List<Node> children = [
45 new StockArrow( 45 new StockArrow(
46 percentChange: stock.percentChange 46 percentChange: stock.percentChange
47 ), 47 ),
48 new Container( 48 new Container(
49 key: 'Ticker', 49 key: 'Ticker',
50 styles: [_tickerStyle], 50 style: _tickerStyle,
51 children: [new Text(stock.symbol)] 51 children: [new Text(stock.symbol)]
52 ), 52 ),
53 new Container( 53 new Container(
54 key: 'LastSale', 54 key: 'LastSale',
55 styles: [_lastSaleStyle], 55 style: _lastSaleStyle,
56 children: [new Text(lastSale)] 56 children: [new Text(lastSale)]
57 ), 57 ),
58 new Container( 58 new Container(
59 key: 'Change', 59 key: 'Change',
60 styles: [_changeStyle], 60 style: _changeStyle,
61 children: [new Text(changeInPrice)] 61 children: [new Text(changeInPrice)]
62 ) 62 )
63 ]; 63 ];
64 64
65 return new Material( 65 return new Material(
66 styles: [_style], 66 style: _style,
67 children: children 67 children: children
68 ); 68 );
69 } 69 }
70 } 70 }
OLDNEW
« no previous file with comments | « sky/examples/stocks-fn/stockarrow.dart ('k') | sky/examples/stocks-fn/stocksapp.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698