DVWorkflowStep.fromJson constructor

DVWorkflowStep.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory DVWorkflowStep.fromJson(Map<String, Object?> json) => DVWorkflowStep(
      id: json['id'] as String?,
      type: json['type']! as String,
      name: json['name'] as String?,
      assignTo: json['assignTo'] as String?,
      arguments: <String, DVWorkflowValue>{
        for (final entry
            in ((json['arguments'] as Map?) ?? const <Object?, Object?>{})
                .entries)
          '${entry.key}': DVWorkflowValue.fromJson(entry.value),
      },
      branches: <String, List<DVWorkflowStep>>{
        for (final entry
            in ((json['branches'] as Map?) ?? const <Object?, Object?>{})
                .entries)
          '${entry.key}': <DVWorkflowStep>[
            for (final step in entry.value! as List)
              DVWorkflowStep.fromJson((step! as Map).cast<String, Object?>()),
          ],
      },
    );