Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/painting/text_style.dart'; | 5 import 'package:sky/painting/text_style.dart'; |
| 6 import 'package:sky/rendering/box.dart'; | 6 import 'package:sky/rendering/box.dart'; |
| 7 import 'package:sky/theme/typography.dart' as typography; | 7 import 'package:sky/theme/typography.dart' as typography; |
| 8 import 'package:sky/widgets/ink_well.dart'; | 8 import 'package:sky/widgets/ink_well.dart'; |
| 9 import 'package:sky/widgets/basic.dart'; | 9 import 'package:sky/widgets/basic.dart'; |
| 10 import 'package:sky/widgets/theme.dart'; | |
| 10 | 11 |
| 11 import 'stock_arrow.dart'; | 12 import 'stock_arrow.dart'; |
| 12 import 'stock_data.dart'; | 13 import 'stock_data.dart'; |
| 13 | 14 |
| 14 class StockRow extends Component { | 15 class StockRow extends Component { |
| 15 | 16 |
| 16 StockRow({ Stock stock }) : this.stock = stock, super(key: stock.symbol); | 17 StockRow({ Stock stock }) : this.stock = stock, super(key: stock.symbol); |
| 17 | 18 |
| 18 final Stock stock; | 19 final Stock stock; |
| 19 | 20 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 36 ), | 37 ), |
| 37 new Flexible( | 38 new Flexible( |
| 38 child: new Text( | 39 child: new Text( |
| 39 lastSale, | 40 lastSale, |
| 40 style: const TextStyle(textAlign: TextAlign.right) | 41 style: const TextStyle(textAlign: TextAlign.right) |
| 41 ) | 42 ) |
| 42 ), | 43 ), |
| 43 new Flexible( | 44 new Flexible( |
| 44 child: new Text( | 45 child: new Text( |
| 45 changeInPrice, | 46 changeInPrice, |
| 46 style: typography.black.caption.copyWith(textAlign: TextAlign.right) | 47 style: Theme.of(this).text.caption.copyWith(textAlign: TextAlign.right ) |
|
eseidel
2015/06/22 22:28:16
Should this be this.theme() instead?
jackson
2015/06/22 22:40:10
Right now that's not how the inheritance system wo
| |
| 47 ) | 48 ) |
| 48 ) | 49 ) |
| 49 ]; | 50 ]; |
| 50 | 51 |
| 51 // TODO(hansmuller): An explicit |height| shouldn't be needed | 52 // TODO(hansmuller): An explicit |height| shouldn't be needed |
| 52 return new InkWell( | 53 return new InkWell( |
| 53 child: new Container( | 54 child: new Container( |
| 54 padding: const EdgeDims(16.0, 16.0, 20.0, 16.0), | 55 padding: const EdgeDims(16.0, 16.0, 20.0, 16.0), |
| 55 height: kHeight, | 56 height: kHeight, |
| 56 decoration: const BoxDecoration( | 57 decoration: const BoxDecoration( |
| 57 border: const Border( | 58 border: const Border( |
| 58 bottom: const BorderSide(color: const Color(0xFFF4F4F4)))), | 59 bottom: const BorderSide(color: const Color(0xFFF4F4F4)))), |
| 59 child: new Flex(children) | 60 child: new Flex(children) |
| 60 ) | 61 ) |
| 61 ); | 62 ); |
| 62 } | 63 } |
| 63 } | 64 } |
| OLD | NEW |