| 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 'dart:sky' as sky; | 5 import 'dart:sky' as sky; |
| 6 import 'package:sky/framework/components2/ink_well.dart'; | 6 import 'package:sky/framework/components2/ink_well.dart'; |
| 7 import 'package:sky/framework/fn2.dart'; | 7 import 'package:sky/framework/fn2.dart'; |
| 8 import 'package:sky/framework/rendering/box.dart'; | 8 import 'package:sky/framework/rendering/box.dart'; |
| 9 import 'package:sky/framework/theme/typography.dart' as typography; | 9 import 'package:sky/framework/theme/typography.dart' as typography; |
| 10 // import 'stock_arrow.dart'; | 10 // import 'stock_arrow.dart'; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%"; | 25 String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%"; |
| 26 if (stock.percentChange > 0) | 26 if (stock.percentChange > 0) |
| 27 changeInPrice = "+" + changeInPrice; | 27 changeInPrice = "+" + changeInPrice; |
| 28 | 28 |
| 29 List<UINode> children = [ | 29 List<UINode> children = [ |
| 30 // new StockArrow( | 30 // new StockArrow( |
| 31 // percentChange: stock.percentChange | 31 // percentChange: stock.percentChange |
| 32 // ), | 32 // ), |
| 33 new FlexExpandingChild(new Text(stock.symbol)), | 33 new FlexExpandingChild(new Text(stock.symbol)), |
| 34 new Container( | 34 new Container( |
| 35 desiredSize: const sky.Size.fromWidth(75.0), | 35 width: 75.0, |
| 36 padding: const EdgeDims.only(right: 16.0), | 36 padding: const EdgeDims.only(right: 16.0), |
| 37 // text-align: right | 37 // text-align: right |
| 38 child: new Text(lastSale) | 38 child: new Text(lastSale) |
| 39 ), | 39 ), |
| 40 // text-align: right, ${typography.black.caption}; | 40 // text-align: right, ${typography.black.caption}; |
| 41 new SizedBox( | 41 new SizedBox( |
| 42 desiredSize: const sky.Size.fromWidth(75.0), | 42 width: 75.0, |
| 43 child: new Text(changeInPrice) | 43 child: new Text(changeInPrice) |
| 44 ), | 44 ), |
| 45 ]; | 45 ]; |
| 46 | 46 |
| 47 return new Container( | 47 return new Container( |
| 48 padding: const EdgeDims(16.0, 16.0, 20.0, 16.0), | 48 padding: const EdgeDims(16.0, 16.0, 20.0, 16.0), |
| 49 desiredSize: const sky.Size.fromHeight(kHeight), | 49 height: kHeight, |
| 50 decoration: const BoxDecoration( | 50 decoration: const BoxDecoration( |
| 51 backgroundColor: const sky.Color(0xFFFFFFFF), | 51 backgroundColor: const sky.Color(0xFFFFFFFF), |
| 52 border: const Border( | 52 border: const Border( |
| 53 bottom: const BorderSide( | 53 bottom: const BorderSide( |
| 54 color: const sky.Color(0xFFF4F4F4), | 54 color: const sky.Color(0xFFF4F4F4), |
| 55 width: 1.0))), | 55 width: 1.0))), |
| 56 child: new FlexContainer(children: children)); | 56 child: new FlexContainer(children: children)); |
| 57 } | 57 } |
| 58 } | 58 } |
| OLD | NEW |