The Stac SetValue widget allows you to set multiple key-value pairs in the application’s state and optionally render a child widget. It’s useful for managing application state through JSON configuration.Documentation Index
Fetch the complete documentation index at: https://docs.stac.dev/llms.txt
Use this file to discover all available pages before exploring further.
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
- Dart
- JSON
- Preview
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.