GlassPicker constructor
- Key? key,
- List<
Widget> ? children, - List<
String> ? items, - required ValueChanged<
int> ? onSelectedItemChanged, - int initialItem = 0,
- FixedExtentScrollController? controller,
- bool looping = false,
- double height = _defaultHeight,
- double itemExtent = _itemExtent,
- String? semanticLabel,
- FocusNode? focusNode,
- bool autofocus = false,
Creates a wheel picker of children or items, not both.
Implementation
const GlassPicker({
super.key,
this.children,
this.items,
required this.onSelectedItemChanged,
this.initialItem = 0,
this.controller,
this.looping = false,
this.height = _defaultHeight,
this.itemExtent = _itemExtent,
this.semanticLabel,
this.focusNode,
this.autofocus = false,
}) : assert((children == null) != (items == null), 'Give either children or items.'),
assert(itemExtent > 0);