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

Unified Diff: sky/examples/stocks-fn/lib/stock_row.dart

Issue 1005393006: Clean up examples directory (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_menu.dart ('k') | sky/examples/stocks-fn/main.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks-fn/lib/stock_row.dart
diff --git a/sky/examples/stocks-fn/lib/stock_row.dart b/sky/examples/stocks-fn/lib/stock_row.dart
deleted file mode 100644
index 6332366a66c48db12b08286e795892af687dcfcd..0000000000000000000000000000000000000000
--- a/sky/examples/stocks-fn/lib/stock_row.dart
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'package:sky/framework/components/ink_well.dart';
-import 'package:sky/framework/fn.dart';
-import 'package:sky/framework/theme/typography.dart' as typography;
-import 'stock_arrow.dart';
-import 'stock_data.dart';
-
-class StockRow extends Component {
- static final Style _style = new Style('''
- display: flex;
- align-items: center;
- border-bottom: 1px solid #F4F4F4;
- padding-top: 16px;
- padding-left: 16px;
- padding-right: 16px;
- padding-bottom: 20px;'''
- );
-
- static final Style _tickerStyle = new Style('''
- flex: 1;'''
- );
-
- static final Style _lastSaleStyle = new Style('''
- text-align: right;
- padding-right: 16px;'''
- );
-
- static final Style _changeStyle = new Style('''
- ${typography.black.caption};
- text-align: right;'''
- );
-
- Stock stock;
-
- StockRow({Stock stock}) : super(key: stock.symbol) {
- this.stock = stock;
- }
-
- Node build() {
- String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}";
-
- String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%";
- if (stock.percentChange > 0)
- changeInPrice = "+" + changeInPrice;
-
- List<Node> children = [
- new StockArrow(
- percentChange: stock.percentChange
- ),
- new Container(
- key: 'Ticker',
- style: _tickerStyle,
- children: [new Text(stock.symbol)]
- ),
- new Container(
- key: 'LastSale',
- style: _lastSaleStyle,
- children: [new Text(lastSale)]
- ),
- new Container(
- key: 'Change',
- style: _changeStyle,
- children: [new Text(changeInPrice)]
- )
- ];
-
- return new StyleNode(new InkWell(children: children), _style);
- }
-}
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_menu.dart ('k') | sky/examples/stocks-fn/main.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698