Swiper class
- Inheritance
- Available extensions
Constructors
-
Swiper.new({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, AxisDirection axisDirection = AxisDirection.left, SwiperPlugin? pagination, List<SwiperPlugin> ? plugins, ScrollPhysics? physics, Key? key, SwiperController? controller, CustomLayoutOption? customLayoutOption, double? containerHeight, double? containerWidth, double viewportFraction = 1.0, double? itemHeight, double? itemWidth, bool outer = false, double? scale, double? fade, bool allowImplicitScrolling = false}) -
const
-
Swiper.children({required List<
Widget> children, bool autoplay = false, PageTransformer? transformer, int autoplayDelay = kDefaultAutoplayDelayMs, bool autoplayDisableOnInteraction = true, int duration = kDefaultAutoplayTransactionDuration, ValueChanged<int> ? onIndexChanged, int? index, SwiperOnTap? onTap, bool loop = true, Curve curve = Curves.ease, Axis scrollDirection = Axis.horizontal, AxisDirection axisDirection = AxisDirection.left, 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? itemWidth, bool outer = false, double scale = 1.0, double? fade, PageIndicatorLayout indicatorLayout = PageIndicatorLayout.NONE, SwiperLayout layout = SwiperLayout.DEFAULT}) -
factory
Properties
- allowImplicitScrolling → bool
-
final
- 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
- axisDirection → AxisDirection
-
left/right for Stack Layout
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 , theSwiper
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
andtransformItemBuilder
must have one not nullfinal - viewportFraction → double
-
final
Methods
-
animate(
{Key? key, List< Effect> ? effects, AnimateCallback? onInit, AnimateCallback? onPlay, AnimateCallback? onComplete, bool? autoPlay, Duration? delay, AnimationController? controller, Adapter? adapter, double? target, double? value}) → Animate -
Available on Widget, provided by the AnimateWidgetExtensions extension
Wraps the target Widget in an Animate instance, and returns the instance for chaining calls. Ex.myWidget.animate()
is equivalent toAnimate(child: myWidget)
. -
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, int wrapWidth = 65}) → 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
Static Methods
-
list<
T> ({PageTransformer? transformer, required List< T> list, CustomLayoutOption? customLayoutOption, required SwiperDataBuilder<T> builder, bool autoplay = false, int autoplayDelay = kDefaultAutoplayDelayMs, bool reverse = false, bool autoplayDisableOnInteraction = true, int duration = kDefaultAutoplayTransactionDuration, ValueChanged<int> ? onIndexChanged, int? index, SwiperOnTap? onTap, bool loop = true, Curve curve = Curves.ease, Axis scrollDirection = Axis.horizontal, AxisDirection axisDirection = AxisDirection.left, SwiperPlugin? pagination, SwiperPlugin? control, List<SwiperPlugin> ? plugins, SwiperController? controller, Key? key, ScrollPhysics? physics, double? containerHeight, double? containerWidth, double viewportFraction = 1.0, double? itemHeight, double? itemWidth, bool outer = false, double scale = 1.0, double? fade, PageIndicatorLayout indicatorLayout = PageIndicatorLayout.NONE, SwiperLayout layout = SwiperLayout.DEFAULT}) → Swiper