Merge pull request #1791 from jason-simmons/stocks_example_fetch

In the stock list, filter out any symbols that have not yet been fetched
This commit is contained in:
Jason Simmons
2015-10-26 12:37:03 -07:00

View File

@@ -171,7 +171,8 @@ class StockHomeState extends State<StockHome> {
int selectedTabIndex = 0;
Iterable<Stock> _getStockList(Iterable<String> symbols) {
return symbols.map((String symbol) => config.stocks[symbol]);
return symbols.map((String symbol) => config.stocks[symbol])
.where((Stock stock) => stock != null);
}
Iterable<Stock> _filterBySearchQuery(Iterable<Stock> stocks) {