BannerCarousel class

Creates a horizontal scrollable list that works from an explicit PageView of BannerModel or Widget.

Along with a row of indicators and as an animation for each page change.

Inheritance

Constructors

BannerCarousel({Key? key, List<BannerModel>? banners, double height = 150, double borderRadius = 5, double width = double.maxFinite, EdgeInsetsGeometry? margin, bool indicatorBottom = true, bool showIndicator = true, Color? disableColor, dynamic onTap(String id)?, double viewportFraction = 1.0, ValueChanged<int>? onPageChanged, int initialPage = 0, Color? activeColor, bool animation = true, IndicatorModel customizedIndicators = _indicatorModel, List<Widget>? customizedBanners, double spaceBetween = 0, PageController? pageController})
BannersCarousel(banners: BannerImages.listBanners)
const
BannerCarousel.fullScreen({Key? key, List<BannerModel>? banners, double height = 150, double borderRadius = 0, double viewportFraction = 1.0, int initialPage = 0, Color? disableColor, ValueChanged<int>? onPageChanged, bool indicatorBottom = true, dynamic onTap(String id)?, bool showIndicator = true, Color? activeColor, bool animation = true, List<Widget>? customizedBanners, IndicatorModel customizedIndicators = _indicatorModel, PageController? pageController})
BannersCarousel.fullScreen(banners: BannerImages.listBanners),
const

Properties

activeColor Color?
Default value Color(0xFF10306D)
final
animation bool
animation teh indicator. Default value true
final
banners List<BannerModel>?
banners List of BannerModel. The imagePath can be assert Path or Network Path
final
borderRadius double
Default value 5
final
customizedBanners List<Widget>?
When you need to create your own Widget banners
final
customizedIndicators IndicatorModel
Default value IndicatorModel.animation(width: 10, height: 10, spaceBetween: 3.0)
final
disableColor Color?
Default value Color(0xFFC4C4C4)
final
hashCode int
The hash code for this object.
no setterinherited
height double
The height is banner carousel height.
final
indicatorBottom bool
indicatorBottom
final
initialPage int
Default value 0
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
The margin around the component.
final
onPageChanged ValueChanged<int>?
Called whenever the page in the center of the viewport changes. Return a int
final
onTap → (dynamic Function(String id)?)
Called whenever the Banner is Tap.
final
pageController PageController?
Margin between the banner
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showIndicator bool
final
spaceBetween double
Margin between the banner
final
viewportFraction double
The fraction of the viewport that each page should occupy.
final
width double
The width is banner carousel height.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _BannerCarouselState
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}) 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