InfiniteCarousel class
Infinite Carousel
Based on ListWheelScrollView to create smooth scroll effect and physics.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- InfiniteCarousel
Constructors
- InfiniteCarousel.builder({Key? key, required int itemCount, required double itemExtent, required Widget itemBuilder(BuildContext context, int itemIndex, int realIndex), ScrollPhysics? physics, ScrollController? controller, void onIndexChanged(int)?, double anchor = 0.0, bool loop = true, double velocityFactor = 0.2, Axis axisDirection = Axis.horizontal, bool center = true, ScrollBehavior? scrollBehavior})
-
Infinite Carousel
Properties
- anchor → double
-
Where to place selected item on the viewport. Ranges from 0 to 1.
final
- axisDirection → Axis
-
Axis direction of carousel. Defaults to
horizontal
.final - center → bool
-
Align selected item to center of the viewport. When this is true, anchor property is ignored.
final
- childDelegate → SliverChildDelegate?
-
Delegate to lazily build items in forward direction.
final
- controller → ScrollController?
-
Scroll controller for InfiniteScrollPhysics.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- itemBuilder → Widget Function(BuildContext context, int itemIndex, int realIndex)
-
To lazily build items on the viewport.
final
- itemCount → int
-
Total items to build for the carousel.
final
- itemExtent → double
-
Maximum width for single item in viewport.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loop → bool
-
Weather to create a infinite looping list. Defaults to true.
final
- onIndexChanged → (void Function(int)?)
-
Callback fired when item is changed.
final
- physics → ScrollPhysics?
-
Types of Physics supported by InfiniteCarousel.
final
- reversedChildDelegate → SliverChildDelegate?
-
Delegate to lazily build items in reverse direction.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollBehavior → ScrollBehavior?
-
Scroll behavior for InfiniteCarousel.
final
- velocityFactor → double
-
Multiply velocity of carousel scrolling by this factor. Defaults to 0.2.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< InfiniteCarousel> -
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