M3EList class
One list for selection, variant, reorder, swipe, and expand.
List-level fields apply to every row. A row opts into swipe with M3EListItem.swipe and into expand with M3EListItem.expanded. A sub-list expansion is its own nested M3EList.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- M3EList
Constructors
-
M3EList({Key? key, required int itemCount, required IndexedWidgetBuilder itemBuilder, double outerRadius = M3EListCardListTheme.defaultOuterRadius, double innerRadius = M3EListCardListTheme.defaultInnerRadius, double gap = M3EListCardListTheme.defaultGap, Color? color, Color? colorBuilder(int index)?, BorderRadius? borderRadiusBuilder(int index, M3ECardPosition position)?, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, void onTap(int index)?, void onLongPress(int index)?, String semanticLabelBuilder(int index)?, MouseCursor? mouseCursor, M3EHapticFeedback haptic = M3EHapticFeedback.none, M3ECardVariant? variant, BorderSide? border, Widget? emptyBuilder, bool selection = false, bool reorder = false, M3ESelectionController? selectionController, ValueChanged<
Set< ? onSelectionChanged, ReorderCallback? onReorder, M3EListSelectionState? selectionState, M3EListReorderState? reorderState, bool embedded = false, String? semanticsLabel, M3EDismissibleListController? dismissController, M3EDismissibleListStyle dismissStyle = const M3EDismissibleListStyle(), bool? allowMultipleExpanded, Set<int> >int> initiallyExpanded = const <int>{}, M3EExpandableStyle? expandStyle, M3ESpring? expandMotion, M3ESpring? collapseMotion, void onExpansionChanged(int index, {required bool isExpanded})?, M3EExpandableListController? expandController}) -
Non-scrollable column.
const
-
M3EList.scrollable({Key? key, required int itemCount, required IndexedWidgetBuilder itemBuilder, double outerRadius = M3EListCardListTheme.defaultOuterRadius, double innerRadius = M3EListCardListTheme.defaultInnerRadius, double gap = M3EListCardListTheme.defaultGap, Color? color, Color? colorBuilder(int index)?, BorderRadius? borderRadiusBuilder(int index, M3ECardPosition position)?, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, void onTap(int index)?, void onLongPress(int index)?, String semanticLabelBuilder(int index)?, MouseCursor? mouseCursor, M3EHapticFeedback haptic = M3EHapticFeedback.none, M3ECardVariant? variant, BorderSide? border, Widget? emptyBuilder, ScrollController? controller, ScrollPhysics? physics, bool shrinkWrap = false, EdgeInsetsGeometry? listPadding, Clip clipBehavior = Clip.hardEdge, bool selection = false, bool reorder = false, M3ESelectionController? selectionController, ValueChanged<
Set< ? onSelectionChanged, ReorderCallback? onReorder, M3EListSelectionState? selectionState, M3EListReorderState? reorderState, bool embedded = false, String? semanticsLabel, M3EDismissibleListController? dismissController, M3EDismissibleListStyle dismissStyle = const M3EDismissibleListStyle(), bool? allowMultipleExpanded, Set<int> >int> initiallyExpanded = const <int>{}, M3EExpandableStyle? expandStyle, M3ESpring? expandMotion, M3ESpring? collapseMotion, void onExpansionChanged(int index, {required bool isExpanded})?, M3EExpandableListController? expandController}) -
Scrollable list.
const
-
M3EList.sliver({Key? key, required int itemCount, required IndexedWidgetBuilder itemBuilder, double outerRadius = M3EListCardListTheme.defaultOuterRadius, double innerRadius = M3EListCardListTheme.defaultInnerRadius, double gap = M3EListCardListTheme.defaultGap, Color? color, Color? colorBuilder(int index)?, BorderRadius? borderRadiusBuilder(int index, M3ECardPosition position)?, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, void onTap(int index)?, void onLongPress(int index)?, String semanticLabelBuilder(int index)?, MouseCursor? mouseCursor, M3EHapticFeedback haptic = M3EHapticFeedback.none, M3ECardVariant? variant, BorderSide? border, Widget? emptyBuilder, bool selection = false, M3ESelectionController? selectionController, ValueChanged<
Set< ? onSelectionChanged, M3EListSelectionState? selectionState, bool embedded = false, String? semanticsLabel, M3EDismissibleListController? dismissController, M3EDismissibleListStyle dismissStyle = const M3EDismissibleListStyle(), bool? allowMultipleExpanded, Set<int> >int> initiallyExpanded = const <int>{}, M3EExpandableStyle? expandStyle, M3ESpring? expandMotion, M3ESpring? collapseMotion, void onExpansionChanged(int index, {required bool isExpanded})?, M3EExpandableListController? expandController}) -
Sliver list. Selection stays; reorder is not supported.
const
Properties
- allowMultipleExpanded → bool?
-
When false, opening one row closes the others.
final
- border → BorderSide?
-
Outline override.
final
- borderRadiusBuilder → BorderRadius? Function(int index, M3ECardPosition position)?
-
Per-index radius. Non-null wins over position radii.
final
- clipBehavior → Clip
-
Clip for M3EList.scrollable.
final
- collapseMotion → M3ESpring?
-
Spring used while collapsing.
final
- color → Color?
-
Shared row fill. Null lets the variant or a parent nest choose.
final
- colorBuilder → Color? Function(int index)?
-
Per-index fill. Non-null wins over color.
final
- controller → ScrollController?
-
Scroll controller for M3EList.scrollable.
final
- dismissController → M3EDismissibleListController?
-
Reveals or dismisses a swiping row by index.
final
- dismissStyle → M3EDismissibleListStyle
-
Shared swipe chrome (springs, action metrics, default background).
final
- embedded → bool
-
Forces nested corner radii even when this list is not under a parent.
final
- emptyBuilder → Widget?
-
Shown when itemCount is 0.
final
- expandController → M3EExpandableListController?
-
Opens a row container transform by index.
final
- expandMotion → M3ESpring?
-
Spring used while expanding.
final
- expandStyle → M3EExpandableStyle?
-
Expandable row decoration override.
final
- gap → double
-
Gap between rows.
final
- haptic → M3EHapticFeedback
-
Haptic on a non-expanding row tap.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
initiallyExpanded
→ Set<
int> -
Rows that start expanded.
final
- innerRadius → double
-
Inner corner radius.
final
- itemBuilder → IndexedWidgetBuilder
-
Builds the row at the given index. A list item can set swipe and expanded.
final
- itemCount → int
-
Number of rows.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listPadding → EdgeInsetsGeometry?
-
Padding around the scrollable list.
final
- margin → EdgeInsetsGeometry?
-
Margin around the whole list.
final
- mouseCursor → MouseCursor?
-
Cursor for a row.
final
- onExpansionChanged → void Function(int index, {required bool isExpanded})?
-
Called when a row expands or collapses.
final
- onLongPress → void Function(int index)?
-
Called when a non-expanding row is long-pressed.
final
- onReorder → ReorderCallback?
-
Called after a reorder drop.
final
-
onSelectionChanged
→ ValueChanged<
Set< ?int> > -
Called when selection changes.
final
- onTap → void Function(int index)?
-
Called when a non-expanding row is tapped.
final
- outerRadius → double
-
Outer corner radius.
final
- padding → EdgeInsetsGeometry?
-
Padding inside each non-expanding row.
final
- physics → ScrollPhysics?
-
Scroll physics for M3EList.scrollable.
final
- reorder → bool
-
Enables long-press reorder. Requires onReorder.
final
- reorderState → M3EListReorderState?
-
Reorder state override.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selection → bool
-
Enables selection.
final
- selectionController → M3ESelectionController?
-
Optional selection controller. An ancestor scope wins.
final
- selectionState → M3EListSelectionState?
-
Selection state override.
final
- semanticLabelBuilder → String Function(int index)?
-
Semantic label for a row.
final
- semanticsLabel → String?
-
List-box description.
final
- shrinkWrap → bool
-
Sizes the scroll view to its children.
final
- variant → M3ECardVariant?
-
Filled, outlined, or elevated. A nested list inherits the parent variant.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< M3EList> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited