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