pub fn visibility(
child: impl UiNode,
visibility: impl IntoVar<Visibility>,
) -> impl UiNode
Expand description
P
Sets the widget visibility.
This property causes the widget to have the visibility
, the widget actual visibility is computed, for example,
widgets that don’t render anything are considered Hidden
even if the visibility property is not set, this property
only forces the widget to layout and render according to the specified visibility.
To probe the visibility state of a widget in when
clauses use is_visible
, is_hidden
or is_collapsed
,
to probe a widget state use WidgetInfo::visibility
.