mapFromJson static method

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

Implementation

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