listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}