AnimatedItemPicker class
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 setter inherited
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.
final inherited
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 setter inherited
animated_item_picker 2.0.0