M3ECarousel constructor

const M3ECarousel({
  1. Key? key,
  2. double? width,
  3. double? height,
  4. Axis axis = Axis.horizontal,
  5. M3ECarouselType type = M3ECarouselType.hero,
  6. bool isExtended = false,
  7. bool freeScroll = false,
  8. M3ECarouselHeroAlignment heroAlignment = M3ECarouselHeroAlignment.center,
  9. double uncontainedItemExtent = M3ECarouselTheme.defaultUncontainedItemExtent,
  10. double uncontainedShrinkExtent = M3ECarouselTheme.defaultUncontainedShrinkExtent,
  11. double childElementBorderRadius = M3ECarouselTheme.defaultBorderRadiusValue,
  12. int scrollAnimationDuration = M3ECarouselTheme.defaultScrollAnimationDuration,
  13. double fixedPulseDelta = 4,
  14. int singleSwipeGestureSensitivityRange = M3ECarouselTheme.defaultSingleSwipeGestureSensitivityRange,
  15. void onTap(
    1. int selectedIndex
    )?,
  16. 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,
  required this.children,
});