pub struct MaterialSlice {
pub key: KeyRef,
pub child: WidgetRef,
pub color: Option<Color>,
}Expand description
A class that can be used as a child to MergeableMaterial. It is a slice of Material
that animates merging with other slices.
All MaterialSlice objects need a key.
Fields§
§key: KeyRefThe key for this item of the list.
child: WidgetRefThe contents of this slice.
color: Option<Color>Defines the color for the slice.
By default, the value of color is ThemeData::card_color.
Implementations§
Source§impl MaterialSlice
impl MaterialSlice
Sourcepub fn new<K>(
key: impl Into<KeyRef>,
child: impl IntoWidget<K>,
) -> MaterialSlice
pub fn new<K>( key: impl Into<KeyRef>, child: impl IntoWidget<K>, ) -> MaterialSlice
Creates a slice of Material that’s mergeable within a MergeableMaterial; Dart’s
optional named arguments are the setters.
Sourcepub fn color(self, color: Color) -> MaterialSlice
pub fn color(self, color: Color) -> MaterialSlice
Dart MaterialSlice(color:).
Trait Implementations§
Source§impl Clone for MaterialSlice
impl Clone for MaterialSlice
Source§impl Debug for MaterialSlice
impl Debug for MaterialSlice
Source§impl From<MaterialSlice> for MergeableMaterialItem
impl From<MaterialSlice> for MergeableMaterialItem
Source§fn from(slice: MaterialSlice) -> MergeableMaterialItem
fn from(slice: MaterialSlice) -> MergeableMaterialItem
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for MaterialSlice
impl !Send for MaterialSlice
impl !Sync for MaterialSlice
impl !UnwindSafe for MaterialSlice
impl Forget for MaterialSlice
impl Freeze for MaterialSlice
impl Move for MaterialSlice
impl Unpin for MaterialSlice
impl UnsafeUnpin for MaterialSlicewhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
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