AnimatedItemPicker class

Inheritance

Constructors

AnimatedItemPicker({Key? key, required Axis axis, required int itemCount, required IndexedItemBuilder itemBuilder, required dynamic onItemPicked(int, bool), double pressedOpacity = 0.9, Duration duration = const Duration(milliseconds: DEFAULT_ITEM_PICKER_ANIMATION_DURATION), Curve curve = Curves.easeIn, Set<int> programmaticSelection = const {}, bool multipleSelection = false, bool expandedItems = false, int? maxItemSelectionCount})

Properties

axis Axis
Axis.horizontal uses Row for AnimatedItem positioning, Axis.vertical - Column.
final
curve Curve
Animation curve.
final
duration Duration
Animation duration.
final
expandedItems bool
Set true to give items equal size by wrapping in Expanded. If AnimatedItemPicker is inside Row or Column setting expandedItems = true, could cause "unbounded width/height" issue, to avoid it consider setting expandedItems = false and giving item size explicitly in 'itemBuilder'. Defaults to false.
final
hashCode int
The hash code for this object.
no setterinherited
itemBuilder IndexedItemBuilder
Builds your selectable widgets.
final
itemCount int
The itemBuilder callback will be called only with indices greater than or equal to zero and less than itemCount.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxItemSelectionCount int?
Prevents selection if _AnimatedItemPickerState._selectedPositions.length == maxItemSelectionCount.
final
multipleSelection bool
Allows multiple item selection. Defaults to false.
final
onItemPicked → dynamic Function(int, bool)
onItemPicked callback is triggered once selection animation is completed.
final
pressedOpacity double
Pressed item opacity. Animates in onTapDown, animates out onTapUp. Defaults to 0.9.
final
programmaticSelection Set<int>
Indices of selected programmatically.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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