VxSwiper class

Use this widget VxSwiper to give your list a swipeable effect with full customization.

Inheritance
Available Extensions

Constructors

VxSwiper({Key? key, required List<Widget> items, double? height, double aspectRatio = 16 / 9, num viewportFraction = 0.8, num initialPage = 0, int realPage = 10000, bool enableInfiniteScroll = true, bool reverse = false, bool autoPlay = false, Duration autoPlayInterval = const Duration(seconds: 5), Duration autoPlayAnimationDuration = const Duration(milliseconds: 800), Curve autoPlayCurve = Curves.fastOutSlowIn, Duration? pauseAutoPlayOnTouch, bool? enlargeCenterPage = false, dynamic onPageChanged(int index)?, ScrollPhysics? scrollPhysics, bool isFastScrollingEnabled = false, Axis scrollDirection = Axis.horizontal})
VxSwiper.builder({Key? key, required int itemCount, required IndexedWidgetBuilder? itemBuilder, double? height, double aspectRatio = 16 / 9, num viewportFraction = 0.8, num initialPage = 0, int realPage = 10000, bool enableInfiniteScroll = true, bool reverse = false, bool autoPlay = false, Duration autoPlayInterval = const Duration(seconds: 5), Duration autoPlayAnimationDuration = const Duration(milliseconds: 800), Curve autoPlayCurve = Curves.fastOutSlowIn, Duration? pauseAutoPlayOnTouch, bool? enlargeCenterPage = false, dynamic onPageChanged(int index)?, ScrollPhysics? scrollPhysics, bool isFastScrollingEnabled = false, Axis scrollDirection = Axis.horizontal})

Properties

aspectRatio double
Aspect ratio is used if no height have been declared.
final
autoPlay bool
Enables auto play, sliding one page at a time.
final
autoPlayAnimationDuration Duration
The animation duration between two transitioning pages while in auto playback.
final
autoPlayCurve Curve
Determines the animation curve physics.
final
autoPlayInterval Duration
Sets Duration to determent the frequency of slides when
final
enableInfiniteScroll bool
Determines if carousel should loop infinitely or be limited to item length.
final
enlargeCenterPage bool?
Determines if current page should be larger then the side images, creating a feeling of depth in the carousel.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Set carousel height and overrides any existing aspectRatio.
final
initialPage num
The initial page to show when first creating the VxSwiper.
final
isFastScrollingEnabled bool
isFastScrollingEnabled can be used to scrolling fast the PageView. But it will not work if autoPlay is enabled. It also sets the scrollPhysics to ClampingScrollPhysics.
final
itemBuilder IndexedWidgetBuilder?
The widget item builder that will be used to build item on demand
final
itemCount int
The widgets count that should be shown at carousel
final
items List<Widget>?
The widgets to be shown in the carousel of default constructor
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
pageController PageController
pageController is created using the properties passed to the constructor and can be used to control the PageView it is passed to.
final
pauseAutoPlayOnTouch Duration?
Sets a timer on touch detected that pause the auto play with the given Duration.
final
realPage num
The actual index of the PageView.
final
reverse bool
Reverse the order of items if set to true.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
The axis along which the page view scrolls.
final
scrollPhysics ScrollPhysics?
How the carousel should respond to user input.
final
viewportFraction num
The fraction of the viewport that each page should occupy.
final

Methods

animateToPage(int page, {required Duration duration, required Curve curve}) Future<void>
Animates the controlled VxSwiper from the current page to the given page.
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() VxSwiperState
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
jumpToPage(int page) → void
Changes which page is displayed in the controlled VxSwiper.
nextPage({required Duration duration, required Curve curve}) Future<void>
Animates the controlled VxSwiper to the next page.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
previousPage({required Duration duration, required Curve curve}) Future<void>
Animates the controlled VxSwiper to the previous page.
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