File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
lib/src/api/models/action Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,15 @@ class SetVariableAction extends ActionModel
2222 /// Value that the variable needs to be updated with.
2323 final String newValue;
2424
25+ /// Whether to toggle the value of the variable instead of setting it
26+ /// if the variable is a boolean.
27+ final bool toggled;
28+
2529 /// Creates a new [SetValueAction] .
2630 SetVariableAction ({
2731 required this .variable,
2832 required this .newValue,
33+ this .toggled = false ,
2934 }) : super (type: ActionType .setVariable);
3035
3136 @override
@@ -35,10 +40,12 @@ class SetVariableAction extends ActionModel
3540 SetVariableAction copyWith ({
3641 VariableData ? variable,
3742 String ? newValue,
43+ bool ? toggled,
3844 }) =>
3945 SetVariableAction (
4046 variable: variable ?? this .variable,
4147 newValue: newValue ?? this .newValue,
48+ toggled: toggled ?? this .toggled,
4249 );
4350
4451 /// Creates a new [SetVariableAction] instance from a JSON data.
You can’t perform that action at this time.
0 commit comments