AdvMergeableMaterial class

Displays a list of AdvMergeableMaterialItem children. The list contains AdvMaterialSlice items whose boundaries are either "merged" with adjacent items or separated by a AdvMaterialGap. The children are distributed along the given mainAxis 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.

See also:

  • Card, a piece of material that does not support splitting and merging but otherwise looks the same.


AdvMergeableMaterial({Key key, Axis mainAxis: Axis.vertical, int elevation: 2, bool hasDividers: false, List<AdvMergeableMaterialItem> children: const <AdvMergeableMaterialItem>[]})
Creates a mergeable Material list of items.


children List<AdvMergeableMaterialItem>
The children of the AdvMergeableMaterial.
elevation int
The z-coordinate at which to place all the Material slices. [...]
hasDividers bool
Whether connected pieces of AdvMaterialSlice have dividers between them.
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
mainAxis Axis
The main layout axis.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
createState() → _AdvMergeableMaterialState
Creates the mutable state for this widget at a given location in the tree. [...]
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toDiagnosticsNode({String name, DiagnosticsTreeStyle style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
toString({DiagnosticLevel minLevel:}) String
Returns a string representation of this object.
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants. [...]
toStringShallow({String joiner: ', ', DiagnosticLevel minLevel: DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object. [...]
toStringShort() String
A short, textual description of this widget.


operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited