Skip to content

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

Description

@D-e-v-N-i-n-j-a

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions