Carousel class

用于创建一个通用的轮播组件,可以基于它封装各种轮播

Inheritance

Constructors

const

Properties

clipBehavior Clip
final
controller CarouselController?
轮播控制器,可选
final
currentIndicatorColor Color
当前选中指示器的颜色
final
disableIndicatorDefaultCallbacks bool
是否禁用默认指示器回调函数
final
hashCode int
The hash code for this object.
no setterinherited
height double
轮播组件的高度
final
indicatorBuilder FunctionIndicatorBuilder?
自定义指示器构建函数,可选
final
indicatorColor Color
默认指示器的颜色
final
indicatorHeight double
指示器的高度
final
indicatorMargin double
指示器之间的间距
final
indicatorShape BoxShape
默认指示器的形状,默认为矩形
final
indicatorToBottom double
指示器距离底部的距离
final
indicatorWidth double
指示器的宽度
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onIndicatorTapped FunctionWithAInt?
当指示器被点击时的回调函数,可选
final
onUnitTapped FunctionWithAInt?
当图像被点击时的回调函数,可选
final
padEnds bool
是否在轮播首尾添加额外的页面, 默认为 true
final
pageSnapping bool
是否启用页面快速吸附,默认为 true
final
reverse bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
final
units List<Widget>
要轮播的组件列表
final
useindicator bool
是否使用指示器,默认为 true
final
width double
轮播组件的宽度
final

Methods

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