listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}