M3ECarouselWrapper class

Wraps M3ECarouselView with tap handling and a neighbor pulse animation.

Item content is laid out at the largest slot size (plus pulse budget) and clipped to the current item bounds. Scrolling and tap pulse only move that clip "window"; the content layer stays still underneath.

Inheritance

Constructors

M3ECarouselWrapper({Key? key, bool freeScroll = false, EdgeInsets? padding, Color? backgroundColor = Colors.transparent, double? elevation = 0.0, ShapeBorder? shape = const RoundedRectangleBorder(), Clip itemClipBehavior = Clip.none, WidgetStateProperty<Color?>? overlayColor, bool itemSnapping = false, bool consumeMaxWeight = true, double shrinkExtent = 0.0, M3ECarouselController? controller, Axis scrollDirection = Axis.horizontal, bool reverse = false, void onTap(int)?, bool enableSplash = true, bool infinite = false, double? itemExtent, List<int>? flexWeights, required List<Widget> children, void onIndexChanged(int)?, double fixedPulseDelta = 4})
Creates a carousel wrapper with optional pulse animation on tap.
const

Properties

backgroundColor Color?
Background color for each item's Material.
final
children List<Widget>
The child widgets for the carousel.
final
consumeMaxWeight bool
Whether collapsed weighted items may expand to the max weight size.
final
controller M3ECarouselController?
Optional controller for the underlying M3ECarouselView.
final
elevation double?
Elevation for each item's Material.
final
enableSplash bool
Whether the wrapper ink layer reports splash feedback.
final
fixedPulseDelta double
Fixed logical pixels added or removed per animating edge at peak pulse.
final
flexWeights List<int>?
Flex weights for weighted layouts.
final
freeScroll bool
Whether free scrolling is enabled (passed through to scroll physics).
final
hashCode int
The hash code for this object.
no setterinherited
infinite bool
Whether the carousel loops infinitely.
final
itemClipBehavior Clip
Clip behavior for pulsed item content.
final
itemExtent double?
Fixed main-axis extent for unweighted layouts.
final
itemSnapping bool
Whether the underlying view snaps to items.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onIndexChanged → void Function(int)?
Called when the leading item index changes.
final
onTap → void Function(int)?
Called when an item is tapped.
final
overlayColor WidgetStateProperty<Color?>?
Ink overlay colors when splash is enabled on the wrapper layer.
final
padding EdgeInsets?
Padding around each carousel item.
final
reverse bool
Whether the list scrolls in the reverse reading direction.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
Scroll axis for the carousel.
final
shape ShapeBorder?
Shape for each item's Material and pulse clip radius.
final
shrinkExtent double
Minimum item extent during scroll transitions.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<M3ECarouselWrapper>
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