listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}