Picker
A generic picker that allows an item to be selected. It is composed of one or more wheels, optionally with separators between those wheels.
The picker supports arrow key navigation:
- Up/Down arrows: Increment/decrement selected value
- Left/Right arrows: Move between wheels
Recommended for touch devices.
Preview
Usage
FPicker(...)
const FPicker(
controller: FPickerController(initialIndexes: []),
style: style,
onChange: (indexes) {},
children: [
FPickerWheel(
flex: 2,
loop: true,
itemExtent: 20,
autofocus: true,
focusNode: FocusNode(),
onFocusChange: (focused) {},
children: [
Text('1'),
Text('2'),
],
),
FPickerWheel.builder(
flex: 2,
itemExtent: 20,
autofocus: true,
focusNode: FocusNode(),
onFocusChange: (focused) {},
builder: (context, index) => Text('$index'),
),
],
);
Examples
Loop
Preview
Lazy
Preview
Multiple Wheels
Preview
With Separators
Preview
Last updated on