mapFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}