Swiper class

Inheritance

Constructors

Swiper({required IndexedWidgetBuilder itemBuilder, PageIndicatorLayout indicatorLayout = PageIndicatorLayout.NONE, PageTransformer? transformer, required int itemCount, bool autoplay = false, SwiperLayout? layout = SwiperLayout.DEFAULT, int autoplayDelay = kDefaultAutoplayDelayMs, bool autoplayDisableOnInteraction = true, int duration = kDefaultAutoplayTransactionDuration, ValueChanged<int>? onIndexChanged, int? index, SwiperOnTap? onTap, SwiperPlugin? control, bool loop = true, Curve curve = Curves.ease, Axis scrollDirection = Axis.horizontal, SwiperPlugin? pagination, List<SwiperPlugin>? plugins, ScrollPhysics? physics, Key? key, SwiperController? controller, CustomLayoutOption? customLayoutOption, double? containerHeight, double? containerWidth, double viewportFraction = 1.0, double itemHeight = double.infinity, double itemWidth = double.infinity, bool outer = false, double? scale, double? fade})
Swiper.children({required List<Widget> children, bool autoplay = false, PageTransformer? transformer, int autoplayDelay = kDefaultAutoplayDelayMs, bool reverse = false, bool autoplayDisableOnInteraction = true, int duration = kDefaultAutoplayTransactionDuration, ValueChanged<int>? onIndexChanged, int index = 0, SwiperOnTap? onTap, bool loop = true, Curve curve = Curves.ease, Axis scrollDirection = Axis.horizontal, SwiperPlugin? pagination, SwiperPlugin? control, List<SwiperPlugin>? plugins, SwiperController? controller, Key? key, CustomLayoutOption? customLayoutOption, ScrollPhysics? physics, double? containerHeight, double? containerWidth, double viewportFraction = 1.0, double itemHeight = double.infinity, double itemWidth = double.infinity, bool outer = false, double scale = 1.0})
factory
Swiper.list({PageTransformer? transformer, required List list, CustomLayoutOption? customLayoutOption, required SwiperDataBuilder builder, bool autoplay = false, int autoplayDelay = kDefaultAutoplayDelayMs, bool reverse = false, bool autoplayDisableOnInteraction = true, int duration = kDefaultAutoplayTransactionDuration, ValueChanged<int>? onIndexChanged, int index = 0, SwiperOnTap? onTap, bool loop = true, Curve curve = Curves.ease, Axis scrollDirection = Axis.horizontal, SwiperPlugin? pagination, SwiperPlugin? control, List<SwiperPlugin>? plugins, SwiperController? controller, Key? key, ScrollPhysics? physics, double? containerHeight, double? containerWidth, double viewportFraction = 1.0, double itemHeight = double.infinity, double itemWidth = double.infinity, bool outer = false, double scale = 1.0})
factory

Properties

autoplay bool
auto play config
final
autoplayDelay int
Duration of the animation between transactions (in millisecond).
final
autoplayDisableOnInteraction bool
disable auto play when interaction
final
containerHeight double?
final
containerWidth double?
final
control SwiperPlugin?
the swiper control button plugin
final
controller SwiperController?
final
curve Curve
transition curve
final
customLayoutOption CustomLayoutOption?
this value is valid when layout == SwiperLayout.CUSTOM
final
duration int
auto play transition duration (in millisecond)
final
fade double?
final
hashCode int
The hash code for this object.
no setterinherited
index int?
Index number of initial slide. If not set , the Swiper is 'uncontrolled', which means manage index by itself If set , the Swiper is 'controlled', which means the index is fully managed by parent widget.
final
indicatorLayout PageIndicatorLayout
final
itemBuilder IndexedWidgetBuilder
Build item on index
final
itemCount int
count of the display items
final
itemHeight double
Inner item height, this property is valid if layout=STACK or layout=TINDER or LAYOUT=CUSTOM,
final
itemWidth double
Inner item width, this property is valid if layout=STACK or layout=TINDER or LAYOUT=CUSTOM,
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layout SwiperLayout?
Build in layouts
final
loop bool
Set to false to disable continuous loop mode.
final
onIndexChanged ValueChanged<int>?
final
onTap SwiperOnTap?
Called when tap
final
outer bool
If set true , the pagination will display 'outer' of the 'content' container.
final
pagination SwiperPlugin?
The swiper pagination plugin
final
physics ScrollPhysics?
final
plugins List<SwiperPlugin>?
other plugins, you can custom your own plugin
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double?
final
scrollDirection Axis
horizontal/vertical
final
transformer → PageTransformer?
Support transform like Android PageView did itemBuilder and transformItemBuilder must have one not null
final
viewportFraction double
final

Methods

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