listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}