WidgetPicker constructor

WidgetPicker({
  1. Key? key,
  2. required List<String> options,
  3. required String value,
  4. required ValueChanged<String> onChanged,
  5. int itemCount = 3,
  6. double itemHeight = 50,
  7. double itemWidth = 100,
  8. Axis axis = Axis.vertical,
  9. TextStyle? textStyle,
  10. TextStyle? selectedTextStyle,
  11. bool haptics = false,
  12. Decoration? decoration,
  13. TextMapper? textMapper,
  14. bool infiniteLoop = false,
})

Implementation

WidgetPicker({
  Key? key,
  required this.options,
  required this.value,
  required this.onChanged,
  this.itemCount = 3,
  this.itemHeight = 50,
  this.itemWidth = 100,
  this.axis = Axis.vertical,
  this.textStyle,
  this.selectedTextStyle,
  this.haptics = false,
  this.decoration,
  this.textMapper,
  this.infiniteLoop = false,
})  : assert(options.contains(value)),
      super(key: key);