listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}