listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}