NumberPicker class
Constructors
NumberPicker ({Key ? key , required int minValue , required int maxValue , required int value , required ValueChanged <int > onChanged , int itemCount = 3 , int step = 1 , double itemHeight = 50 , double itemWidth = 100 , Axis axis = Axis.vertical , TextStyle ? textStyle , TextStyle ? selectedTextStyle , bool haptics = false , Decoration ? decoration , bool zeroPad = false , TextMapper ? textMapper , bool infiniteLoop = false })
const
Properties
axis
→ Axis
Direction of scrolling
final
decoration
→ Decoration ?
Decoration to apply to central box where the selected value is placed
final
haptics
→ bool
Whether to trigger haptic pulses or not
final
hashCode
→ int
The hash code for this object.
no setter inherited
infiniteLoop
→ bool
final
itemCount
→ int
Specifies how many items should be shown - defaults to 3
final
itemHeight
→ double
height of single item in pixels
final
itemWidth
→ double
width of single item in pixels
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
maxValue
→ int
Max value user can pick
final
minValue
→ int
Min value user can pick
final
onChanged
→ ValueChanged <int >
Called when selected value changes
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
selectedTextStyle
→ TextStyle ?
Style of non-selected numbers. If null, it uses Theme's headline5 with accentColor
final
step
→ int
Step between elements. Only for integer datePicker
Examples:
if step is 100 the following elements may be 100, 200, 300...
if min=0, max=6, step=3, then items will be 0, 3 and 6
if min=0, max=5, step=3, then items will be 0 and 3.
final
textMapper
→ TextMapper ?
Build the text of each item on the picker
final
textStyle
→ TextStyle ?
Style of non-selected numbers. If null, it uses Theme's bodyText2
final
value
→ int
Currently selected value
final
zeroPad
→ bool
Pads displayed integer values up to the length of maxValue
final