listFromJson static method
Implementation
static List<OccupantCollection> listFromJson(List<dynamic>? json) {
if (json == null) {
return <OccupantCollection>[];
}
return json.fold(<OccupantCollection>[],
(List<OccupantCollection> previousValue, element) {
final OccupantCollection? object = OccupantCollection.fromJson(element);
if (object is OccupantCollection) {
previousValue.add(object);
}
return previousValue;
});
}