WorkflowGraph.fromJson constructor

WorkflowGraph.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory WorkflowGraph.fromJson(Map<String, dynamic> json) {
  return WorkflowGraph(
    edges: (json['Edges'] as List?)
        ?.whereNotNull()
        .map((e) => Edge.fromJson(e as Map<String, dynamic>))
        .toList(),
    nodes: (json['Nodes'] as List?)
        ?.whereNotNull()
        .map((e) => Node.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}