WorkflowRules.fromJson constructor

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

Implementation

factory WorkflowRules.fromJson(Map<String, Object?> json) {
  return WorkflowRules(
    conditionsTree: json[r'conditionsTree'] != null
        ? WorkflowCondition.fromJson(
            json[r'conditionsTree']! as Map<String, Object?>)
        : null,
    postFunctions: (json[r'postFunctions'] as List<Object?>?)
            ?.map((i) => WorkflowTransitionRule.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    validators: (json[r'validators'] as List<Object?>?)
            ?.map((i) => WorkflowTransitionRule.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
  );
}