listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}