SyncfusionExamples/render_chart_with_firebase_json_data_flutter_charts

Unhandled Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Iterable<dynamic>'

Opened this issue · 0 comments

 
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));
  });
}