fromJson static method

(List<String>, Map<String, List<RewardsModel>>) fromJson(
  1. Map temp
)

Implementation

static (List<String> dates, Map<String, List<RewardsModel>>) fromJson(
    Map temp) {
  List<String> dates = [
    ...temp.keys.toList().map(
          (e) => e,
    ),
  ];
  final Map<String, List<RewardsModel>> temp2 = {};
  for (var i in dates) {
    temp2[i] = [
      ...temp[i].map((e) {
        return RewardsModel.fromJson(e);
      }),
    ];
  }
  return (dates, temp2);
}