mapFromJson static method

Map<String, VacationDay> mapFromJson(
  1. dynamic json
)

Implementation

static Map<String, VacationDay> mapFromJson(dynamic json) {
  final map = <String, VacationDay>{};
  if (json is Map && json.isNotEmpty) {
    json.cast<String, dynamic>().forEach(
        (key, dynamic value) => map[key] = VacationDay.fromJson(value));
  }
  return map;
}