pub fn value<T: VarValue>(
child: impl UiNode,
value: impl IntoVar<T>,
) -> impl UiNode
Expand description
P
Values that is selected in the contextual selector
.
The widget is_checked
when the value is selected, on click and on value update, the selection
is updated according to the behavior defined in the contextual selector
. If no contextual
selector
is the widget is never checked.
Note that the value can be any type, but must be one of the types accepted by the contextual selector
, type
validation happens in run-time, an error is logged if the type is not compatible. Because any type can be used in
this property type inference cannot resolve the type automatically and a type annotation is required: value<T> = t;
.
This property interacts with the contextual selector
, when the widget is clicked or the value
variable changes
the contextual Selector
is used to implement the behavior.