listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}