Commit 7e9bbbec authored by Eric Seidel's avatar Eric Seidel

Sort the stocks displayed in stocks-fn as per Material Design

http://www.google.com/design/spec/components/lists.html#lists-behavior

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/993093004
parent a8891ed0
...@@ -31,7 +31,12 @@ class StocksApp extends App { ...@@ -31,7 +31,12 @@ class StocksApp extends App {
margin: 0 4px;''' margin: 0 4px;'''
); );
StocksApp() : super(); List<Stock> _sortedStocks;
StocksApp() : super() {
_sortedStocks = oracle.stocks;
_sortedStocks.sort((a, b) => a.symbol.compareTo(b.symbol));
}
Node build() { Node build() {
var drawer = new Drawer( var drawer = new Drawer(
...@@ -93,7 +98,7 @@ class StocksApp extends App { ...@@ -93,7 +98,7 @@ class StocksApp extends App {
new Container( new Container(
key: 'Content', key: 'Content',
style: _style, style: _style,
children: [toolbar, new Stocklist(stocks: oracle.stocks)] children: [toolbar, new Stocklist(stocks: _sortedStocks)]
), ),
fab, fab,
drawer, drawer,
......
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