Properties
| Property | Type | Description |
|---|---|---|
| values | List<Map<String, dynamic>> | List of key-value pairs to set in the application state. |
| child | StacWidget | Optional child widget to render after the values are set. |
values should contain:
key: The state key to setvalue: The value to assign
Example
Initializing State on Screen Load
UseStacSetValue to initialize state when a screen loads:
Reading State Values
After setting values withStacSetValue, you can read them using placeholder syntax {{key}}:
For action-based state updates (e.g., on button press), see StacSetValueAction.