listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}