Swiper class
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 , 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 ? 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 ? 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 setter inherited
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.
final inherited
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
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 setter inherited
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
flutter_swiper_null_safety_flutter3 4.0.2