Function zng::widget::node::with_widget_state_modify
source ยท pub fn with_widget_state_modify<U, S, V, I, M>(
child: U,
id: impl Into<StateId<S>>,
value: impl IntoVar<V>,
default: I,
modify: M,
) -> impl UiNode
Expand description
Helper for declaring properties that set the widget state with a custom closure.
The default
closure is used to init the state value, then the modify
closure is used to modify the state using the variable value.
On deinit the default
value is set on the state again.
See with_widget_state
for more details.