pub enum TapTarget {
Padded,
ShrinkWrap,
}Expand description
How much room a small control reserves for the finger that works it.
A switch paints a track 32 pixels tall; a checkbox paints a box of 20. Neither is
something a finger can be asked to hit. The reference lays both out inside a
48-pixel square and paints the small thing in the middle of it, and it makes that a
theme-wide setting with a per-widget override, because it is the kind of decision an
application makes once (theme_data.dart:172).
This is a layout answer, not a visual one. What the control paints does not change; the room around it does, and so does the area a click may land in.
Variants§
Padded
At least MIN_TAP_TARGET on both sides — the default, as it is over there.
ShrinkWrap
Only SHRUNK_TAP_TARGET: for the dense interface that has measured its own
reach and decided, which is a decision rather than an oversight.
Implementations§
Trait Implementations§
impl Copy for TapTarget
impl Eq for TapTarget
impl StructuralPartialEq for TapTarget
Auto Trait Implementations§
impl Freeze for TapTarget
impl RefUnwindSafe for TapTarget
impl Send for TapTarget
impl Sync for TapTarget
impl Unpin for TapTarget
impl UnsafeUnpin for TapTarget
impl UnwindSafe for TapTarget
Blanket Implementations§
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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.