listFromJson static method

List<SectionLinksSelfIriTemplate> listFromJson(
  1. List? json
)

Implementation

static List<SectionLinksSelfIriTemplate> listFromJson(List<dynamic>? json) {
  if (json == null) {
    return <SectionLinksSelfIriTemplate>[];
  }

  return json.fold(<SectionLinksSelfIriTemplate>[],
      (List<SectionLinksSelfIriTemplate> previousValue, element) {
    final SectionLinksSelfIriTemplate? object =
        SectionLinksSelfIriTemplate.fromJson(element);
    if (object is SectionLinksSelfIriTemplate) {
      previousValue.add(object);
    }

    return previousValue;
  });
}