AntdSwiper class
@t 走马灯 @g 信息展示 @o 77 @d 一组轮播的区域。 @u 当有一组平级的内容。当内容空间不足时,可以用走马灯的形式进行收纳,进行轮播展现。
Constructors
-
AntdSwiper.new({Key? key, AntdSwiperStyle? style, AntdStyleBuilder<
AntdSwiperStyle, AntdSwiper> ? styleBuilder, double? edgeThreshold, AntdOnScrollEdge? onEdgeReached, AntdSwiperController? controller, double cacheExtent = 1.5, CacheExtentStyle cacheExtentStyle = CacheExtentStyle.viewport, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollBehavior? scrollBehavior = const CupertinoScrollBehavior(), bool vertical = true, bool reversed = false, bool? shrinkWrap = false, bool virtual = false, required List<Widget> items, AntdScrollItemBuilder<Widget, AntdSwiperController> ? itemBuilder, List<Widget> ? headers, AntdItemPositionListener<Widget> ? onItemPosition, Duration? throttle, bool allowTouchMove = true, bool autoplay = false, Duration autoplayInterval = const Duration(milliseconds: 3000), int activeIndex = 0, bool loop = false, AntdSwiperIndicatorBuilder? indicatorBuilder, AntdSwiperOnIndexChange? onChange}) -
const
Properties
- activeIndex → int
-
初始位置
final
- alignment → AntdEdge?
-
根据方向自动优化视图边界
finalinherited
- allowTouchMove → bool
-
是否允许手势滑动
final
- autoplay → bool
-
是否自动切换
final
- autoplayInterval → Duration
-
自动切换的间隔,单位为 ms
final
- cacheExtent → double
-
预渲染区域大小
finalinherited
- cacheExtentStyle → CacheExtentStyle
-
预渲染区域计算方式
finalinherited
- controller → AntdSwiperController?
-
控制器
finalinherited
- dragStartBehavior → DragStartBehavior
-
拖动开始行为
finalinherited
- edgeThreshold → double?
-
触边阈值 (0-1表示百分比)
finalinherited
- fit → AntdScrollItemFit
-
自动适配策略
finalinherited
-
尾部的sliver
finalinherited
- gridDelegate → SliverGridDelegate?
-
宫格排列
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ List<
Widget> ? -
头部的sliver
finalinherited
- indicatorBuilder → AntdSwiperIndicatorBuilder?
-
自定义指示器
final
-
itemBuilder
→ AntdScrollItemBuilder<
Widget, AntdSwiperController> ? -
数据构造器
finalinherited
-
items
→ List<
Widget> -
滚动的数据
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loop → bool
-
是否循环
final
- onChange → AntdSwiperOnIndexChange?
-
事件
final
- onEdgeReached → AntdOnScrollEdge?
-
当触碰到边界时的回调
finalinherited
-
onItemPosition
→ AntdItemPositionListener<
Widget> ? -
item变更事件
finalinherited
- physics → ScrollPhysics?
-
滚动物理效果
finalinherited
- reversed → bool
-
是否反向滚动
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollBehavior → ScrollBehavior?
-
滚动行为
finalinherited
- shrinkWrap → bool?
-
自动扩展高度
finalinherited
-
slivers
→ List<
Widget> ? -
子组件
finalinherited
- style → AntdSwiperStyle?
-
样式
finalinherited
-
styleBuilder
→ AntdStyleBuilder<
AntdSwiperStyle, AntdSwiper> ? -
动态样式
finalinherited
- throttle → Duration?
-
滚动事件节流时长
finalinherited
- vertical → bool
-
滚动方向
finalinherited
- viewportOffset → double?
-
偏移位置
finalinherited
- virtual → bool
-
启动虚拟滚动
finalinherited
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
-
getDefaultStyle(
BuildContext context, AntdTheme theme, AntdMapToken token) → AntdSwiperStyle -
override
-
getFinalStyle(
BuildContext context, AntdSwiperStyle style, AntdMapToken token) → AntdSwiperStyle -
inherited
-
getInputStyle(
BuildContext context) → AntdSwiperStyle? -
inherited
-
getStyle(
BuildContext context) → AntdSwiperStyle -
inherited
-
getStyleBuilder(
BuildContext context) → AntdStyleBuilder< AntdSwiperStyle, AntdSwiper> ? -
inherited
-
getThemeStyle(
BuildContext context, AntdTheme theme) → AntdStyleBuilder< AntdSwiperStyle, AntdSwiper> ? -
override
-
getWidget(
BuildContext context) → AntdSwiper -
override
-
margeStyle(
AntdSwiperStyle defaultStyle, AntdSwiperStyle? style) → AntdSwiperStyle -
override
-
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