fromJson static method

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

Implementation

static Parameter fromJson(
    Map<String, dynamic> json, ActionMapper actionMapper) {
  assert(json['type'] != null, 'Parameter type must be defined');
  if (json['type'] == 'variable') {
    return ParameterVariable.fromJson(json);
  } else if (json['type'] == 'workflow') {
    return ParameterWorkflow.fromJson(json, actionMapper);
  }
  throw Exception('Unknown parameter type');
}