Picker constructor

Picker({
  1. required Widget child,
  2. required PickerType initialValue,
  3. required Color backgroundColor,
  4. required PickerController controller,
  5. double initialExtent = 0.55,
  6. double minExtent = 0.0,
  7. double mediumExtent = 0.55,
  8. double expandedExtent = 1.0,
  9. Color maxBackdropColor = Colors.black,
  10. ImagePickerConfigDelegate? imagePickerDelegate,
  11. GiphyPickerConfigDelegate? giphyPickerDelegate,
  12. CustomPickerConfigDelegate? customPickerDelegate,
})

Implementation

Picker({
  required this.child,
  required this.initialValue,
  required this.backgroundColor,
  required this.controller,
  this.initialExtent = 0.55,
  this.minExtent = 0.0,
  this.mediumExtent = 0.55,
  this.expandedExtent= 1.0,
  this.maxBackdropColor = Colors.black,
  this.imagePickerDelegate,
  this.giphyPickerDelegate,
  this.customPickerDelegate,
}) : assert(
  imagePickerDelegate != null ||
  giphyPickerDelegate != null ||
  customPickerDelegate != null
),
assert(initialValue != PickerType.ImagePicker || imagePickerDelegate != null),
assert(initialValue != PickerType.GiphyPickerView || giphyPickerDelegate != null),
assert(initialValue != PickerType.Custom || customPickerDelegate != null);