BannerCarousel constructor

const BannerCarousel({
  1. Key? key,
  2. List<BannerModel>? banners,
  3. double height = 150,
  4. double borderRadius = 5,
  5. double width = double.maxFinite,
  6. EdgeInsetsGeometry? margin,
  7. bool indicatorBottom = true,
  8. bool showIndicator = true,
  9. Color? disableColor,
  10. dynamic onTap(
    1. String id
    )?,
  11. double viewportFraction = 1.0,
  12. ValueChanged<int>? onPageChanged,
  13. int initialPage = 0,
  14. Color? activeColor,
  15. bool animation = true,
  16. IndicatorModel customizedIndicators = _indicatorModel,
  17. List<Widget>? customizedBanners,
  18. double spaceBetween = 0,
  19. PageController? pageController,
})
 BannersCarousel(banners: BannerImages.listBanners)

Implementation

const BannerCarousel({
  Key? key,
  this.banners,
  this.height = 150,
  this.borderRadius = 5,
  this.width = double.maxFinite,
  this.margin,
  this.indicatorBottom = true,
  this.showIndicator = true,
  this.disableColor,
  this.onTap,
  this.viewportFraction = 1.0,
  this.onPageChanged,
  this.initialPage = 0,
  this.activeColor,
  this.animation = true,
  this.customizedIndicators = _indicatorModel,
  this.customizedBanners,
  this.spaceBetween = 0,
  this.pageController,
})  : assert(banners != null || customizedBanners != null,
          'banners or customizedBanners need to be implemented'),
      assert(
          banners == null || customizedBanners == null,
          'Cannot provide both a banners and a customizedBanners\n'
          'Choose only one to implement'),
      super(key: key);