fromJson static method

ConditionalAction fromJson(
  1. Map<String, dynamic> json,
  2. ActionMapper actionMapper
)
override

Implementation

static ConditionalAction fromJson(
    Map<String, dynamic> json, ActionMapper actionMapper) {
  return ConditionalAction(
    id: json['id'],
    condition: json['condition'] != null
        ? FCondition.fromJson(json['condition'])
        : const FCondition(),
    actionsTrueWorkflow: (json['actions_true_workflow'] as List<dynamic>)
        .map((e) => actionMapper.fromJson(e, actionMapper))
        .toList(),
    actionsFalseWorkflow: (json['actions_false_workflow'] as List<dynamic>)
        .map((e) => actionMapper.fromJson(e, actionMapper))
        .toList(),
  );
}