BottomPicker constructor

BottomPicker({
  1. Key? key,
  2. required Widget pickerTitle,
  3. Widget? pickerDescription,
  4. required List<Widget>? items,
  5. Alignment? titleAlignment,
  6. EdgeInsetsGeometry titlePadding = const EdgeInsets.all(0),
  7. bool dismissable = false,
  8. dynamic onChange(
    1. dynamic
    )?,
  9. dynamic onSubmit(
    1. dynamic
    )?,
  10. Function? onClose,
  11. BottomPickerTheme bottomPickerTheme = BottomPickerTheme.blue,
  12. List<Color>? gradientColors,
  13. int selectedItemIndex = 0,
  14. double? buttonPadding,
  15. double? buttonWidth,
  16. Color? buttonSingleColor,
  17. Color backgroundColor = Colors.white,
  18. TextStyle pickerTextStyle = const TextStyle(fontSize: 14, color: Colors.black),
  19. double itemExtent = 35.0,
  20. bool displayCloseIcon = true,
  21. @Deprecated('Will be removed, if not null `onClose` will override the close button onTap function') bool popOnClose = true,
  22. Color closeIconColor = Colors.black,
  23. double closeIconSize = 20,
  24. LayoutOrientation layoutOrientation = LayoutOrientation.ltr,
  25. MainAxisAlignment buttonAlignment = MainAxisAlignment.center,
  26. double? height,
  27. bool displaySubmitButton = true,
  28. Widget? selectionOverlay,
  29. Widget? buttonContent,
  30. BoxDecoration? buttonStyle,
})

Implementation

BottomPicker({
  Key? key,
  required this.pickerTitle,
  this.pickerDescription,
  required this.items,
  this.titleAlignment,
  this.titlePadding = const EdgeInsets.all(0),
  this.dismissable = false,
  this.onChange,
  this.onSubmit,
  this.onClose,
  this.bottomPickerTheme = BottomPickerTheme.blue,
  this.gradientColors,
  this.selectedItemIndex = 0,
  this.buttonPadding,
  this.buttonWidth,
  this.buttonSingleColor,
  this.backgroundColor = Colors.white,
  this.pickerTextStyle = const TextStyle(
    fontSize: 14,
    color: Colors.black,
  ),
  this.itemExtent = 35.0,
  this.displayCloseIcon = true,
  @Deprecated(
    'Will be removed, if not null `onClose` will override the close button onTap function',
  )
  this.popOnClose = true,
  this.closeIconColor = Colors.black,
  this.closeIconSize = 20,
  this.layoutOrientation = LayoutOrientation.ltr,
  this.buttonAlignment = MainAxisAlignment.center,
  this.height,
  this.displaySubmitButton = true,
  this.selectionOverlay,
  this.buttonContent,
  this.buttonStyle,
}) : super(key: key) {
  dateOrder = null;
  onRangeDateSubmitPressed = null;
  bottomPickerType = BottomPickerType.simple;
  assert(items != null && items!.isNotEmpty);
  assert(selectedItemIndex >= 0);
  if (selectedItemIndex > 0) {
    assert(selectedItemIndex < items!.length);
  }
}