diff --git a/crates/ui-contract/src/runtime/commands/mod.rs b/crates/ui-contract/src/runtime/commands/mod.rs index 2374d4cef..6b2e32f9e 100644 --- a/crates/ui-contract/src/runtime/commands/mod.rs +++ b/crates/ui-contract/src/runtime/commands/mod.rs @@ -297,6 +297,11 @@ impl CommandState { self.flags.enabled } + /// The checked state [`checked`](Self::checked) set; `None` for a command that is not a toggle or radio. + pub fn is_checked(&self) -> Option { + self.flags.checked + } + pub(crate) fn is_marked(&self) -> bool { self.marked }