// To parse this JSON data, do // // final chartResponse = chartResponseFromJson(jsonString); import 'dart:convert'; List chartResponseFromJson(String str) => List.from(json.decode(str).map((x) => ChartResponse.fromJson(x))); String chartResponseToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); class ChartResponse { ChartResponse({ this.total, this.date, }); double? total; String? date; factory ChartResponse.fromJson(Map json) => ChartResponse( total: json["total"].toDouble(), date: json["date"], ); Map toJson() => { "total": total, "date": date, }; }