mapFromJson static method

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

Implementation

static Map<String, DeviceLinksSelf> mapFromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return <String, DeviceLinksSelf>{};
  }

  return json.entries.fold(<String, DeviceLinksSelf>{},
      (Map<String, DeviceLinksSelf> previousValue, element) {
    final DeviceLinksSelf? object = DeviceLinksSelf.fromJson(element.value);
    if (object is DeviceLinksSelf) {
      previousValue[element.key] = object;
    }

    return previousValue;
  });
}