pub fn named_style_fn(
wgt: &mut WidgetBuilding,
name: impl IntoValue<NamedStyleVar>,
)Expand description
B Set in the default properties of a named style to define the contextual variable for that style.
During widget instantiation, if this is set by default in a style the contextual style is used as the defaults and only the properties set on the style instance replace them.
This property is part of the named styles pattern, see impl_named_style_fn! for more details.
Note that this property expects a ContextVar<StyleFn> as a value, not a variable directly, it will also only work if
set in the default properties of a style type.
ยงMixin Property
This property is a mixin, it modifies the widget builder during build, it does not produce a standalone UI node.