CurvedCarousel class

Inheritance

Constructors

CurvedCarousel({Key? key, required Widget itemBuilder(BuildContext, int), required int itemCount, double viewPortSize = 0.20, double curveScale = 8, bool scaleMiddleItem = true, double middleItemScaleRatio = 1.2, bool disableInfiniteScrolling = false, bool tiltItemWithcurve = true, double horizontalPadding = 0, int animationDuration = 300, void onChangeEnd(int index, bool automatic)?, void onChangeStart(int index, bool automatic)?, bool moveAutomatically = false, int automaticMoveDelay = 5000, bool reverseAutomaticMovement = false, bool horizontal = true})
const

Properties

animationDuration int
The duration of the item change animation in milliseconds
final
automaticMoveDelay int
The delay between to automatic movement. If the moveAutomatically attribut is true then this variable control how often does the automatic change of item need to happend in milliseconds.
final
curveScale double
set curviness factor
final
disableInfiniteScrolling bool
to enable/disable infinite scrolling
final
hashCode int
The hash code for this object.
no setterinherited
horizontal bool
To enable or disable vertical listing of the item. By default is is set to true.
final
horizontalPadding double
The padding to apply horizontally to the carousel
final
itemBuilder Widget Function(BuildContext, int)
final
itemCount int
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
middleItemScaleRatio double
selected middle item scale ratio
final
moveAutomatically bool
Does the change of item need to be automatic. If true use the automaticMoveDelay and reverseAutomaticMovement to trigger automatically the change of item every automaticMoveDelay secondes. If false the only way to change item is to swipe left or right on the carousel
final
onChangeEnd → (void Function(int index, bool automatic)?)
The function to trigger when the item change animation is done
final
onChangeStart → (void Function(int index, bool automatic)?)
The function to trigger when the item change animation is start
final
reverseAutomaticMovement bool
The direction of the automatic movement If the moveAutomatically attribut is true then this controls the direction of the automatic change of item If this attribut is true then the movement will move the items backward.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleMiddleItem bool
scale middle item or not
final
tiltItemWithcurve bool
Does the items angle need to be follow to curve. If true the item angle will match the curve, if false the item will stay aligned with the screen
final
viewPortSize double
provide viewport size
final

Methods

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