listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}