| OLD | NEW |
| 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; |
| 11 border-bottom: 1px solid #F4F4F4; | 11 border-bottom: 1px solid #F4F4F4; |
| 12 padding-top: 16px; | 12 padding-top: 16px; |
| 13 padding-left: 16px; | 13 padding-left: 16px; |
| 14 padding-right: 16px; | 14 padding-right: 16px; |
| 15 padding-bottom: 20px;''' | 15 padding-bottom: 20px;''' |
| 16 ); | 16 ); |
| 17 | 17 |
| 18 static Style _tickerStyle = new Style(''' | 18 static Style _tickerStyle = new Style(''' |
| 19 flex: 1; | 19 flex: 1;''' |
| 20 font-family: 'Roboto Medium', 'Helvetica';''' | |
| 21 ); | 20 ); |
| 22 | 21 |
| 23 static Style _lastSaleStyle = new Style(''' | 22 static Style _lastSaleStyle = new Style(''' |
| 24 text-align: right; | 23 text-align: right; |
| 25 padding-right: 16px;''' | 24 padding-right: 16px;''' |
| 26 ); | 25 ); |
| 27 | 26 |
| 28 static Style _changeStyle = new Style(''' | 27 static Style _changeStyle = new Style(''' |
| 29 color: #8A8A8A; | 28 ${typography.black.caption}; |
| 30 text-align: right;''' | 29 text-align: right;''' |
| 31 ); | 30 ); |
| 32 | 31 |
| 33 StockRow({Stock stock}) : super(key: stock.symbol) { | 32 StockRow({Stock stock}) : super(key: stock.symbol) { |
| 34 this.stock = stock; | 33 this.stock = stock; |
| 35 } | 34 } |
| 36 | 35 |
| 37 Node build() { | 36 Node build() { |
| 38 String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}"; | 37 String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}"; |
| 39 | 38 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 61 children: [new Text(changeInPrice)] | 60 children: [new Text(changeInPrice)] |
| 62 ) | 61 ) |
| 63 ]; | 62 ]; |
| 64 | 63 |
| 65 return new Material( | 64 return new Material( |
| 66 style: _style, | 65 style: _style, |
| 67 children: children | 66 children: children |
| 68 ); | 67 ); |
| 69 } | 68 } |
| 70 } | 69 } |
| OLD | NEW |