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 mainAxis in the same way as the children of a BlockBody. 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.
See also:
- Card, a piece of material that does not support splitting and merging but otherwise looks the same.
- Inheritance
- Object
- Widget
- StatefulWidget
- MergeableMaterial
Constructors
-
MergeableMaterial({Key key, Axis mainAxis: Axis.vertical, int elevation: 2, bool hasDividers: false, List<MergeableMaterialItem> children: const
[] }) -
Creates a mergeable Material list of items.
Properties
- children → List<MergeableMaterialItem>
-
The children of the MergeableMaterial.
read-only - elevation → int
-
The z-coordinate at which to place all the Material slices.
read-only - hasDividers → bool
-
Whether connected pieces of MaterialSlice have dividers between them.
read-only - mainAxis → Axis
-
The main layout axis.
read-only - hashCode → int
-
Get a hash code for this object.
read-only, inherited - key → Key
-
Controls how one widget replaces another widget in the tree.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
createState(
) → _MergeableMaterialState -
Creates the mutable state for this widget at a given location in the tree.
-
toString(
) → String -
Returns a string representation of this object.
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited -
debugFillDescription(
List<String> description) → void -
Add additional information to the given description for use by toString.
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toStringShort(
) → String -
A short, textual description of this widget.
inherited