Commit 310ce318 authored by Jason Simmons's avatar Jason Simmons

Merge pull request #1791 from jason-simmons/stocks_example_fetch

In the stock list, filter out any symbols that have not yet been fetched
parents 7822bd03 194f0f22
......@@ -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) {
......
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