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