MorphingListBuilder<T extends Object> class
A high-level builder that integrates MorphingOverlay, OverlayMorphController, MorphingSource, and optionally a grid or carousel preview mode into a single API.
This removes the need for developers to manually wire up controllers, overlays, and morph sources when building spatial interfaces.
Quick Start
MorphingListBuilder<Product>(
items: products,
itemBuilder: (context, item, index) => ProductTile(item),
previewBuilder: (context, item, progress) => ProductPreviewCard(item),
detailBuilder: (context, item, progress) => ProductDetailScreen(item),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MorphingListBuilder
Constructors
-
MorphingListBuilder({Key? key, required List<
T> items, required Widget itemBuilder(BuildContext context, T item, int index), required Widget previewBuilder(BuildContext context, T item, double progress), required Widget detailBuilder(BuildContext context, T item, double progress), Widget titleBuilder(BuildContext context, T item)?, bool grid = false, bool previewCarousel = false, EdgeInsetsGeometry padding = EdgeInsets.zero, double maxRadius = 16.0, double maxElevation = 16.0, Color? surfaceColor, Color? scrimColor, bool enableBlur = true, Widget thumbnailBuilder(BuildContext context, T item, int index, bool isActive)?, double thumbnailSize = 52.0, double thumbnailSpacing = 12.0, EdgeInsets thumbnailPadding = const EdgeInsets.symmetric(horizontal: 16.0), Color? thumbnailActiveBorderColor}) -
const
Properties
- detailBuilder → Widget Function(BuildContext context, T item, double progress)
-
Builds the fullscreen detail view.
final
- enableBlur → bool
-
Whether to blur the background during expansion.
final
- grid → bool
-
Whether to render the items in a responsive grid layout.
If false, uses a standard list view.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemBuilder → Widget Function(BuildContext context, T item, int index)
-
Builds the item tile for the grid or list view.
final
-
items
→ List<
T> -
The list of items to display.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxElevation → double
-
Maximum elevation (shadow depth) for the morphing card.
final
- maxRadius → double
-
Maximum border radius for the morphing card.
final
- padding → EdgeInsetsGeometry
-
Padding applied to the underlying scroll view.
final
- previewBuilder → Widget Function(BuildContext context, T item, double progress)
-
Builds the floating preview card (shown during card/carousel mode).
final
- previewCarousel → bool
-
Whether to enable horizontal swiping between items in preview mode.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrimColor → Color?
-
Color of the overlay scrim.
final
-
A function to provide an optional hero tag for shared element transitions.
If provided, MorphShared will automatically be wrapped around the appropriate builders.
final
- surfaceColor → Color?
-
Background color of the morphing container.
final
- thumbnailActiveBorderColor → Color?
-
final
- thumbnailBuilder → Widget Function(BuildContext context, T item, int index, bool isActive)?
-
Optional builder for circular thumbnails in the overlay mode.
final
- thumbnailPadding → EdgeInsets
-
final
- thumbnailSize → double
-
final
- thumbnailSpacing → double
-
final
- titleBuilder → Widget Function(BuildContext context, T item)?
-
Builds a title/header shown in the overlay mode.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MorphingListBuilder< T> > -
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