fromJson static method
Implementation
static CubitAction fromJson(Map<String, dynamic> json) {
if (json['type'] == 'emit_new_state') {
return EmitNewStateAction.fromJson(json);
}
if (json['type'] == 'run_cubit_workflow') {
return RunCubitWorkflowAction.fromJson(json);
}
throw Exception('Unknown action type');
}