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
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- M3ECarouselWrapper
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, bool scaleItems = true, M3ECarouselController? controller, Axis scrollDirection = Axis.horizontal, bool reverse = false, void onTap(int)?, M3EHapticFeedback haptic = M3EHapticFeedback.none, bool enableSplash = true, bool infinite = false, double? itemExtent, List<int> ? flexWeights, required List<M3ECarouselItem> children, void onIndexChanged(int)?, ValueChanged<M3ECarouselChangeDetails> ? onChange, ValueChanged<int> ? onFocusedIndex, bool reducedMotion = false, List<double> ? itemExtents, double leadingInset = 0, double trailingGap = 0, 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<
M3ECarouselItem> -
Items in 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
- haptic → M3EHapticFeedback
-
Haptic intensity on item tap. Defaults to M3EHapticFeedback.none.
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
-
itemExtents
→ List<
double> ? -
Resting main-axis size of each item.
final
- itemSnapping → bool
-
Whether the underlying view snaps to items.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leadingInset → double
-
Empty space before the first item on uncontained tracks.
final
-
onChange
→ ValueChanged<
M3ECarouselChangeDetails> ? -
Called when the leading or focal item index changes.
final
-
onFocusedIndex
→ ValueChanged<
int> ? -
Called when keyboard focus moves to an item.
final
-
onIndexChanged
→ ValueChanged<
int> ? -
Called when the leading item index changes.
final
-
onTap
→ ValueChanged<
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
- reducedMotion → bool
-
Turns off parallax and size morphing.
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
- scaleItems → bool
-
Whether fixed-extent items shrink as they scroll.
final
- scrollDirection → Axis
-
Scroll axis for the carousel.
final
- shape → ShapeBorder?
-
Shape for each item's
Materialand pulse clip radius.final - shrinkExtent → double
-
Minimum item extent during scroll transitions.
final
- trailingGap → double
-
Empty space after each item, inside a fixed extent.
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