listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}