StacSetValueAction allows you to set or update values in the application state. It’s useful for updating state in response to user interactions like button presses.
Properties
| Property | Type | Description |
|---|---|---|
| values | List<Map<String, dynamic>> | List of key-value pairs to write to the application state. |
| action | StacAction | Optional action to execute after the values are set. |
values should contain:
key: The state key to setvalue: The value to assign
Example
Toggle Value on Button Press
Update Multiple Values with Follow-up Action
Chaining with Network Request
For setting initial state when a screen loads (without an action trigger), use the StacSetValue widget instead.