GlassPicker constructor

const GlassPicker({
  1. Key? key,
  2. List<Widget>? children,
  3. List<String>? items,
  4. required ValueChanged<int>? onSelectedItemChanged,
  5. int initialItem = 0,
  6. FixedExtentScrollController? controller,
  7. bool looping = false,
  8. double height = _defaultHeight,
  9. double itemExtent = _itemExtent,
  10. String? semanticLabel,
  11. FocusNode? focusNode,
  12. 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);