listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}