BottomPicker constructor
BottomPicker({
- Key? key,
- required Widget pickerTitle,
- Widget? pickerDescription,
- required List<
Widget> ? items, - Alignment? titleAlignment,
- EdgeInsetsGeometry titlePadding = const EdgeInsets.all(0),
- bool dismissable = false,
- dynamic onChange(
- dynamic
- dynamic onSubmit(
- dynamic
- Function? onClose,
- BottomPickerTheme bottomPickerTheme = BottomPickerTheme.blue,
- List<
Color> ? gradientColors, - int selectedItemIndex = 0,
- double? buttonPadding,
- double? buttonWidth,
- Color? buttonSingleColor,
- Color backgroundColor = Colors.white,
- TextStyle pickerTextStyle = const TextStyle(fontSize: 14, color: Colors.black),
- double itemExtent = 35.0,
- bool displayCloseIcon = true,
- @Deprecated('Will be removed, if not null `onClose` will override the close button onTap function') bool popOnClose = true,
- Color closeIconColor = Colors.black,
- double closeIconSize = 20,
- LayoutOrientation layoutOrientation = LayoutOrientation.ltr,
- MainAxisAlignment buttonAlignment = MainAxisAlignment.center,
- double? height,
- bool displaySubmitButton = true,
- Widget? selectionOverlay,
- Widget? buttonContent,
- 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);
}
}