pub fn widget_state_get_state<T: VarValue>(
child: impl IntoUiNode,
get_new: impl Fn(StateMapRef<'_, WIDGET>, &T) -> Option<T> + Send + 'static,
get_deinit: impl Fn(StateMapRef<'_, WIDGET>, &T) -> Option<T> + Send + 'static,
state: impl IntoVar<T>,
) -> UiNodeExpand description
Helper for declaring state getter properties that are controlled by values in the widget state map.
The get_new closure is called with the widget state and current state every init and update, if it returns some value
the state updates. The get_deinit closure is called on deinit to get the reset value.