WorkflowTransitionRules.fromJson constructor

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

Implementation

factory WorkflowTransitionRules.fromJson(Map<String, Object?> json) {
  return WorkflowTransitionRules(
    conditions: (json[r'conditions'] as List<Object?>?)
            ?.map((i) => AppWorkflowTransitionRule.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    postFunctions: (json[r'postFunctions'] as List<Object?>?)
            ?.map((i) => AppWorkflowTransitionRule.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    validators: (json[r'validators'] as List<Object?>?)
            ?.map((i) => AppWorkflowTransitionRule.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    workflowId: WorkflowId.fromJson(
        json[r'workflowId'] as Map<String, Object?>? ?? const {}),
  );
}