A State Change can be used along with a button
to change values in the state
of a widgets closest, state
holding ancestor.
You can create a state_change
like this:
{
"type": "raised_button",
"text": "Enable dark mode",
"state_change": {
"primary_color": "#000000",
"dark": true
}
}