mapFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}