Index: sky/examples/stocks-fn/lib/stock_app.dart |
diff --git a/sky/examples/stocks-fn/lib/stock_app.dart b/sky/examples/stocks-fn/lib/stock_app.dart |
index c2ef40d7a4f955f612bee3910aba6760e15709fc..0331b5233ad5f067ea059e0f49415f520535cb98 100644 |
--- a/sky/examples/stocks-fn/lib/stock_app.dart |
+++ b/sky/examples/stocks-fn/lib/stock_app.dart |
@@ -33,14 +33,18 @@ class StocksApp extends App { |
${typography.white.title};''' |
); |
- List<Stock> _sortedStocks; |
+ List<Stock> _sortedStocks = []; |
bool _isSearching = false; |
bool _isShowingMenu = false; |
String _searchQuery; |
StocksApp() : super() { |
- _sortedStocks = oracle.stocks; |
- _sortedStocks.sort((a, b) => a.symbol.compareTo(b.symbol)); |
+ fetchStockOracle().then((oracle) { |
+ setState(() { |
+ _sortedStocks = oracle.stocks; |
+ _sortedStocks.sort((a, b) => a.symbol.compareTo(b.symbol)); |
+ }); |
+ }); |
} |
void _handleSearchClick(_) { |