pub struct WidgetStatePropertyAll<T> {
pub value: T,
}Expand description
Convenience class for creating a WidgetStateProperty that
resolves to the given value for all states.
See also:
MaterialStatePropertyAll, the Material specific version ofWidgetStatePropertyAll.
Fields§
§value: TThe value of the property that will be used for all states.
Implementations§
Source§impl<T> WidgetStatePropertyAll<T>
impl<T> WidgetStatePropertyAll<T>
Sourcepub const fn new(value: T) -> WidgetStatePropertyAll<T>
pub const fn new(value: T) -> WidgetStatePropertyAll<T>
Constructs a WidgetStateProperty that always resolves to the given
value.
Trait Implementations§
Source§impl<T: Clone> Clone for WidgetStatePropertyAll<T>
impl<T: Clone> Clone for WidgetStatePropertyAll<T>
Source§impl<T: Debug> Debug for WidgetStatePropertyAll<T>
impl<T: Debug> Debug for WidgetStatePropertyAll<T>
Source§impl<T: PartialEq> PartialEq for WidgetStatePropertyAll<T>
impl<T: PartialEq> PartialEq for WidgetStatePropertyAll<T>
impl<T: PartialEq> StructuralPartialEq for WidgetStatePropertyAll<T>
Source§impl<T: Clone + Debug + PartialEq + 'static> WidgetStateProperty<T> for WidgetStatePropertyAll<T>
impl<T: Clone + Debug + PartialEq + 'static> WidgetStateProperty<T> for WidgetStatePropertyAll<T>
Source§fn resolve(&self, _states: &WidgetStates) -> T
fn resolve(&self, _states: &WidgetStates) -> T
Source§fn eq_property(&self, other: &dyn WidgetStateProperty<T>) -> bool
fn eq_property(&self, other: &dyn WidgetStateProperty<T>) -> bool
Dart’s
==. Identity unless a class overrides it, as WidgetStatePropertyAll and
WidgetStateMapper do.Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Dart’s
WidgetStateProperty.debugFillProperties, from Diagnosticable: a property
adds its own fields.Source§fn as_mapper(&self) -> Option<&WidgetStateMapper<T>>
fn as_mapper(&self) -> Option<&WidgetStateMapper<T>>
Dart’s
other is WidgetStateMapper<T>: the mapper this property is, if it is one,
as the private mapper subclasses of WidgetStateColor and the rest are.Auto Trait Implementations§
impl<T> Forget for WidgetStatePropertyAll<T>
impl<T> Freeze for WidgetStatePropertyAll<T>where
T: Freeze,
impl<T> Move for WidgetStatePropertyAll<T>
impl<T> RefUnwindSafe for WidgetStatePropertyAll<T>where
T: RefUnwindSafe,
impl<T> Send for WidgetStatePropertyAll<T>where
T: Send,
impl<T> Sync for WidgetStatePropertyAll<T>where
T: Sync,
impl<T> Unpin for WidgetStatePropertyAll<T>where
T: Unpin,
impl<T> UnsafeUnpin for WidgetStatePropertyAll<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WidgetStatePropertyAll<T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more