Fix a Dart 2 type error in the Stocks example (#15634)

This commit is contained in:
Jason Simmons
2018-03-16 17:39:50 -07:00
committed by GitHub
parent 8379927985
commit 2cbe01df4b

View File

@@ -56,9 +56,9 @@ class StockData extends ChangeNotifier {
bool get loading => _httpClient != null;
void add(List<List<String>> data) {
for (List<String> fields in data) {
final Stock stock = new Stock.fromFields(fields);
void add(List<dynamic> data) {
for (List<dynamic> fields in data) {
final Stock stock = new Stock.fromFields(fields.cast<String>());
_symbols.add(stock.symbol);
_stocks[stock.symbol] = stock;
}