pub struct CustomSemanticsAction {
pub label: Option<String>,
pub hint: Option<String>,
pub action: Option<SemanticsAction>,
}Expand description
An identifier of a custom semantics action.
Custom semantics actions can be provided to make complex user interactions more accessible. For instance, if an application has a drag-and-drop list that requires the user to press and hold an item to move it, users interacting with the application using a hardware switch may have difficulty. This can be made accessible by creating custom actions and pairing them with handlers that move a list item up or down in the list.
In Android, these actions are presented in the local context menu. In iOS, these are presented in the radial context menu.
Localization and text direction do not automatically apply to the provided label or hint.
Dart’s identifier registry (getIdentifier, getAction, resetForTests) waits with the
semantics tree, which is what sends the identifiers.
Fields§
§label: Option<String>The user readable name of this custom semantics action.
hint: Option<String>The hint description of this custom semantics action.
action: Option<SemanticsAction>The standard semantics action this action replaces.
Implementations§
Source§impl CustomSemanticsAction
impl CustomSemanticsAction
Sourcepub fn new(label: impl Into<String>) -> CustomSemanticsAction
pub fn new(label: impl Into<String>) -> CustomSemanticsAction
Creates a new CustomSemanticsAction.
The label must not be empty.
Sourcepub fn overriding_action(
hint: impl Into<String>,
action: SemanticsAction,
) -> CustomSemanticsAction
pub fn overriding_action( hint: impl Into<String>, action: SemanticsAction, ) -> CustomSemanticsAction
Creates a new CustomSemanticsAction that overrides a standard semantics
action.
The hint must not be empty.
Trait Implementations§
Source§impl Clone for CustomSemanticsAction
impl Clone for CustomSemanticsAction
Source§impl Debug for CustomSemanticsAction
impl Debug for CustomSemanticsAction
impl Eq for CustomSemanticsAction
Source§impl Hash for CustomSemanticsAction
impl Hash for CustomSemanticsAction
Source§impl PartialEq for CustomSemanticsAction
impl PartialEq for CustomSemanticsAction
impl StructuralPartialEq for CustomSemanticsAction
Auto Trait Implementations§
impl Forget for CustomSemanticsAction
impl Freeze for CustomSemanticsAction
impl Move for CustomSemanticsAction
impl RefUnwindSafe for CustomSemanticsAction
impl Send for CustomSemanticsAction
impl Sync for CustomSemanticsActionwhere
RawVecInner: Sync,
impl Unpin for CustomSemanticsAction
impl UnsafeUnpin for CustomSemanticsAction
impl UnwindSafe for CustomSemanticsAction
Blanket Implementations§
Source§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.