pub struct MergeableMaterial {
pub key: Option<KeyRef>,
pub children: Vec<MergeableMaterialItem>,
pub main_axis: Axis,
pub elevation: f64,
pub has_dividers: bool,
pub divider_color: Option<Color>,
}Expand description
Displays a list of MergeableMaterialItem children. The list contains MaterialSlice
items whose boundaries are either “merged” with adjacent items or separated by a
MaterialGap. The children are distributed along the given main_axis in the same way as
the children of a ListBody. When the list of children changes, gaps are automatically
animated open or closed as needed.
To enable this widget to correlate its list of children with the previous one, each child must specify a key.
When a new gap is added to the list of children the adjacent items are animated apart. Similarly when a gap is removed the adjacent items are brought back together.
When a new slice is added or removed, the app is responsible for animating the transition of the slices, while the gaps will be animated automatically.
Fields§
§key: Option<KeyRef>§children: Vec<MergeableMaterialItem>The children of the mergeable material.
main_axis: AxisThe main layout axis.
elevation: f64The z-coordinate at which to place all the Material slices.
has_dividers: boolWhether connected pieces of MaterialSlice have dividers between them.
divider_color: Option<Color>Defines the color used for dividers if has_dividers is true.
Implementations§
Source§impl MergeableMaterial
impl MergeableMaterial
Sourcepub fn new() -> MergeableMaterial
pub fn new() -> MergeableMaterial
Creates a mergeable Material list of items; Dart’s optional named arguments are the setters.
Sourcepub fn key(self, key: KeyRef) -> MergeableMaterial
pub fn key(self, key: KeyRef) -> MergeableMaterial
Dart MergeableMaterial(key:).
Sourcepub fn children(
self,
children: impl IntoIterator<Item = MergeableMaterialItem>,
) -> MergeableMaterial
pub fn children( self, children: impl IntoIterator<Item = MergeableMaterialItem>, ) -> MergeableMaterial
Dart MergeableMaterial(children:).
Sourcepub fn main_axis(self, main_axis: Axis) -> MergeableMaterial
pub fn main_axis(self, main_axis: Axis) -> MergeableMaterial
Dart MergeableMaterial(mainAxis:).
Sourcepub fn elevation(self, elevation: f64) -> MergeableMaterial
pub fn elevation(self, elevation: f64) -> MergeableMaterial
Dart MergeableMaterial(elevation:).
Sourcepub fn has_dividers(self, has_dividers: bool) -> MergeableMaterial
pub fn has_dividers(self, has_dividers: bool) -> MergeableMaterial
Dart MergeableMaterial(hasDividers:).
Sourcepub fn divider_color(self, divider_color: Color) -> MergeableMaterial
pub fn divider_color(self, divider_color: Color) -> MergeableMaterial
Dart MergeableMaterial(dividerColor:).
Trait Implementations§
Source§impl Debug for MergeableMaterial
impl Debug for MergeableMaterial
Source§impl Default for MergeableMaterial
impl Default for MergeableMaterial
Source§fn default() -> MergeableMaterial
fn default() -> MergeableMaterial
Source§impl StatefulWidget for MergeableMaterial
impl StatefulWidget for MergeableMaterial
Source§type State = MergeableMaterialState
type State = MergeableMaterialState
Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn create_state(&self) -> MergeableMaterialState
fn create_state(&self) -> MergeableMaterialState
Source§fn as_preferred_size_widget(
&self,
) -> Option<&(dyn PreferredSizeWidget + 'static)>
fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Widget::type_name. A stateful form another widget kind becomes (an animated or
status transition widget) names the widget it wraps.Auto Trait Implementations§
impl !RefUnwindSafe for MergeableMaterial
impl !Send for MergeableMaterial
impl !Sync for MergeableMaterial
impl !UnwindSafe for MergeableMaterial
impl Forget for MergeableMaterial
impl Freeze for MergeableMaterialwhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<MergeableMaterialItem>: Freeze,
impl Move for MergeableMaterial
impl Unpin for MergeableMaterial
impl UnsafeUnpin for MergeableMaterialwhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<MergeableMaterialItem>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
impl<W> IntoWidget<StatefulKind> for Wwhere
W: StatefulWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
creation_location.