listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}