From 8713c93c6cde37dab63fce5ad6704fe5fbb61e5d Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sun, 22 Nov 2026 08:22:12 +0700 Subject: [PATCH] ui-contract: CommandState::is_checked reads the checked state the app set --- crates/ui-contract/src/runtime/commands/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) 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 }