pub fn cmd(wgt: &mut WidgetBuilding, cmd: impl IntoVar<Command>)Expand description
B Sets the Command the button represents.
When this is set the button widget sets these properties if they are not set:
child: Set to a widget produced bycmd_child_fn, by default isText!(cmd.name()).tooltip_fn: Set to a widget function provided bycmd_tooltip_fn, by default it shows the command info and first shortcut.enabled: Set tocmd.is_enabled().visibility: Set tocmd.has_handlers().into().on_click: Set to a handler that notifies the command ifcmd.is_enabled().on_disabled_click: Set to a handler that notifies the command if!cmd.is_enabled().
ยงMixin Property
This property is a mixin, it modifies the widget builder during build, it does not produce a standalone UI node.