From 7ff22a955c15b5388b9111f0be0212c100b6a0ae Mon Sep 17 00:00:00 2001 From: Rafael Weinstein Date: Mon, 16 Mar 2015 12:27:25 -0700 Subject: [PATCH] [Effen] add StyleNode This patch adds a new (non-Render) StyleNode which takes two arguments: A (content) node, which it wraps and a Style object. This allows for styles to be applied to Nodes which are constructed elsewhere (e.g. passed in as arguments). R=abarth@chromium.org Review URL: https://codereview.chromium.org/1027653002 --- examples/stocks-fn/lib/stock_app.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/stocks-fn/lib/stock_app.dart b/examples/stocks-fn/lib/stock_app.dart index f79c26ad18..87f5e6dca7 100644 --- a/examples/stocks-fn/lib/stock_app.dart +++ b/examples/stocks-fn/lib/stock_app.dart @@ -40,6 +40,10 @@ class StocksApp extends App { ${typography.white.title};''' ); + static Style _stocklistHeight = new Style(''' + flex: 1;''' + ); + List _sortedStocks; bool _isSearching = false; bool _isShowingMenu = false; @@ -137,7 +141,9 @@ class StocksApp extends App { ] ); - var list = new Stocklist(stocks: _sortedStocks, query: _searchQuery); + var list = new StyleNode( + new Stocklist(stocks: _sortedStocks, query: _searchQuery), + _stocklistHeight); var fab = new FloatingActionButton(content: new Icon( type: 'content/add_white', size: 24), level: 3);