M3ECarousel constructor
const
M3ECarousel({
- Key? key,
- M3ECarouselController? controller,
- double? width,
- double? height,
- Axis axis = Axis.horizontal,
- M3ECarouselType type = M3ECarouselType.hero,
- bool? isExtended,
- bool? freeScroll,
- M3ECarouselHeroAlignment heroAlignment = M3ECarouselHeroAlignment.center,
- double uncontainedItemExtent = M3ECarouselTheme.defaultUncontainedItemExtent,
- double uncontainedShrinkExtent = M3ECarouselTheme.defaultUncontainedShrinkExtent,
- double? childElementBorderRadius,
- double? largeMaxWidth,
- EdgeInsetsGeometry? itemPadding,
- int scrollAnimationDuration = M3ECarouselTheme.defaultScrollAnimationDuration,
- double fixedPulseDelta = 4,
- int singleSwipeGestureSensitivityRange = M3ECarouselTheme.defaultSingleSwipeGestureSensitivityRange,
- void onTap(
- int selectedIndex
- ValueChanged<
M3ECarouselChangeDetails> ? onChange, - M3EHapticFeedback haptic = M3EHapticFeedback.none,
- Widget? header,
- bool showAll = false,
- required List<
M3ECarouselItem> children,
Creates a Material Design carousel.
Implementation
const M3ECarousel({
super.key,
this.controller,
this.width,
this.height,
this.axis = Axis.horizontal,
this.type = M3ECarouselType.hero,
this.isExtended,
this.freeScroll,
this.heroAlignment = M3ECarouselHeroAlignment.center,
this.uncontainedItemExtent = M3ECarouselTheme.defaultUncontainedItemExtent,
this.uncontainedShrinkExtent =
M3ECarouselTheme.defaultUncontainedShrinkExtent,
this.childElementBorderRadius,
this.largeMaxWidth,
this.itemPadding,
this.scrollAnimationDuration =
M3ECarouselTheme.defaultScrollAnimationDuration,
this.fixedPulseDelta = 4,
this.singleSwipeGestureSensitivityRange =
M3ECarouselTheme.defaultSingleSwipeGestureSensitivityRange,
this.onTap,
this.onChange,
this.haptic = M3EHapticFeedback.none,
this.header,
this.showAll = false,
required this.children,
});