Commit 7ff22a95 authored by Rafael Weinstein's avatar Rafael Weinstein

[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
parent 11155a2b
...@@ -40,6 +40,10 @@ class StocksApp extends App { ...@@ -40,6 +40,10 @@ class StocksApp extends App {
${typography.white.title};''' ${typography.white.title};'''
); );
static Style _stocklistHeight = new Style('''
flex: 1;'''
);
List<Stock> _sortedStocks; List<Stock> _sortedStocks;
bool _isSearching = false; bool _isSearching = false;
bool _isShowingMenu = false; bool _isShowingMenu = false;
...@@ -137,7 +141,9 @@ class StocksApp extends App { ...@@ -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( var fab = new FloatingActionButton(content: new Icon(
type: 'content/add_white', size: 24), level: 3); type: 'content/add_white', size: 24), level: 3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment