Unhandled Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Iterable<dynamic>'
Opened this issue · 0 comments
D-e-v-N-i-n-j-a commented
Future loadSalesData() async {
String jsonString = await getJsonFromFirebaseRestAPI();
final jsonResponse = json.decode(jsonString);
setState(() {
for (Map<String, dynamic> i in jsonResponse)
chartData.add(SalesData.fromJson(i));
});
}