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

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

Issue 1132983007: [Layout] Put in some guards to prevent us from reintroducing 'display' properties into the CSS. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: git cl status Created 5 years, 7 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/lib/stock_arrow.dart ('k') | sky/framework/components/menu_item.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks/lib/stock_row.dart
diff --git a/sky/examples/stocks/lib/stock_row.dart b/sky/examples/stocks/lib/stock_row.dart
index 1b4578aff00ec363ff6aaaec507bdfb167fc99df..a0ef8bcf2978336886a45e8e7dad96ecee0d345f 100644
--- a/sky/examples/stocks/lib/stock_row.dart
+++ b/sky/examples/stocks/lib/stock_row.dart
@@ -4,14 +4,13 @@
import 'package:sky/framework/components/ink_well.dart';
import 'package:sky/framework/fn.dart';
+import 'package:sky/framework/layout.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;
- flex-direction: row;
align-items: center;
border-bottom: 1px solid #F4F4F4;
padding-top: 16px;
@@ -20,9 +19,7 @@ class StockRow extends Component {
padding-bottom: 20px;'''
);
- static final Style _tickerStyle = new Style('''
- flex: 1;'''
- );
+ static final FlexBoxParentData _tickerFlex = new FlexBoxParentData()..flex = 1;
static final Style _lastSaleStyle = new Style('''
text-align: right;
@@ -51,10 +48,12 @@ class StockRow extends Component {
new StockArrow(
percentChange: stock.percentChange
),
- new Container(
- key: 'Ticker',
- style: _tickerStyle,
- children: [new Text(stock.symbol)]
+ new ParentDataNode(
+ new Container(
+ key: 'Ticker',
+ children: [new Text(stock.symbol)]
+ ),
+ _tickerFlex
),
new Container(
key: 'LastSale',
« no previous file with comments | « sky/examples/stocks/lib/stock_arrow.dart ('k') | sky/framework/components/menu_item.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698