listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}