GFCarousel class

Inheritance
Available extensions

Constructors

GFCarousel({Key? key, required List<Widget> items, double? pagerSize, Color? passiveIndicator, Color? activeIndicator, Border? activeDotBorder, Border? passiveDotBorder, bool? hasPagination, double? height, double aspectRatio = 16 / 9, num viewportFraction = 0.8, int initialPage = 0, bool enableInfiniteScroll = true, bool reverse = false, bool autoPlay = false, Duration autoPlayInterval = const Duration(seconds: 4), Duration autoPlayAnimationDuration = const Duration(milliseconds: 800), Curve autoPlayCurve = Curves.fastOutSlowIn, Duration? pauseAutoPlayOnTouch, bool enlargeMainPage = false, dynamic onPageChanged(int index)?, ScrollPhysics? scrollPhysics, Axis scrollDirection = Axis.horizontal})
Creates slide show of Images and Widget with animation for sliding.
const

Properties

activeDotBorder Border?
The slider pagination's active border.
final
activeIndicator Color?
The slider pagination's active color.
final
aspectRatio double
Aspect ratio is used if no height have been declared. Defaults to 16:9 aspect ratio.
final
autoPlay bool
Enables auto play, sliding one page at a time. Use autoPlayInterval to determent the frequency of slides. Defaults to false.
final
autoPlayAnimationDuration Duration
The animation duration bestuckValue two transitioning pages while in auto playback. Defaults to 800 ms.
final
autoPlayCurve Curve
Determines the animation curve physics. Defaults to Curves.fastOutSlowIn.
final
autoPlayInterval Duration
Sets Duration to determent the frequency of slides when autoPlay is set to true. Defaults to 4 seconds.
final
enableInfiniteScroll bool
Determines if slides should loop infinitely or be limited to item length. Defaults to true, i.e. infinite loop.
final
enlargeMainPage bool
Determines if current page should be larger then the side images, creating a feeling of depth in the carousel. Defaults to false. works only if viewportFraction set to 1.0.
final
hashCode int
The hash code for this object.
no setterinherited
hasPagination bool?
The GFCarousel shows pagination on state true.
final
height double?
Set slide widget height and overrides any existing aspectRatio.
final
initialPage int
The initial page to show when first creating the GFCarousel. Defaults to 0.
final
items List<Widget>
The widgets to be shown as sliders.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onPageChanged → dynamic Function(int index)?
Called whenever the page in the center of the viewport changes.
final
pagerSize double?
The pagination dots size can be defined using double.
final
passiveDotBorder Border?
The slider pagination's passive border.
final
passiveIndicator Color?
The slider pagination's passive color.
final
pauseAutoPlayOnTouch Duration?
Sets a timer on touch detected that pause the auto play with the given Duration. Touch Detection is only active if autoPlay is true.
final
reverse bool
Reverse the order of items if set to true. Defaults to false.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
The axis along which the page view scrolls. Defaults to Axis.horizontal.
final
scrollPhysics ScrollPhysics?
How the carousel should respond to user input.
final
viewportFraction num
The fraction of the viewport that each page should occupy. Defaults to 0.8, which means each page fills 80% of the slide.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _GFCarouselState
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
map<T>(List list, Function handler) List<T>
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