listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}