A comprehensive and highly customizable bottom sheet picker widget for Flutter that brings beautiful, native-like pickers to all platforms.
New in v5.0.0: Full support for the latest Flutter version >=3.44.0 with decoupled Material UI and Cupertino UI themes, providing better flexibility and cleaner architecture.
/// Renders the header component of the bottom pickerfinalWidgetFunction(BuildContext context)? headerBuilder;
///defines whether the bottom picker is dismissable or not///by default it's set to false///finalbool dismissable;
///list of items (List of widgets) used to create simple item picker (required)///and should not be empty or null//////for date/dateTime/time items parameter is not availablelateList<T>? items;
/// Callback function used to build the item widget for each item in the list./// only for simple item picker, for date/time/dateTime picker this parameter is not available/// if Null the picker will display [Text] widget with the item.toString() valueWidgetFunction(T item, int index)? itemBuilder;
///Nullable function, invoked when navigating between picker items///whether it's date picker or simple item picker it will return a value DateTime or int(index)lateFunction(T)? onChange;
/// Predicate function used to filter items in the search field/// if not null the search field will be displayed and the user can filter the items based on the predicate/// Takes two parameters: the item and the search query, and returns a boolean indicating whether the item should be filtered out or not.SearchItemPredicate<T>? filterPredicate;
/// The search field text input action, which determines the action button on the keyboard.TextInputAction? textInputAction;
/// The decoration for the search field, which allows customization of the appearance of the search field.InputDecoration? searchFieldDecoration;
///Nullable function invoked when clicking on submit button///if the picker type is date/time/dateTime it will return DateTime value///else it will return the index of the selected itemlateFunction(T?)? onSubmit;
/// Nullable function invoked when the picker get dismissed/// it will return the selected valuelateFunction(T?)? onDismiss;
///Invoked when clicking on the close buttonFunction? onCloseButtonPressed;
///set the theme of the bottom picker (the button theme)///possible values///```///{///blue,///orange,///temptingAzure,///heavyRain,///plumPlate,///morningSalad///}///```finalBottomPickerTheme bottomPickerTheme;
///used for simple bottom picker///by default it's 0, needs to be in the range [0, this.items.length-1]///otherwise an exception will be thrown///for date and time picker type this parameter is not available///lateint selectedItemIndex;
///The initial date time applied on the date and time picker///by default it's null///DateTime? initialDateTime;
///The initial time set in the time picker widget///required only when using the `time` constructorTime? initialTime;
/// The initial duration set for the timer picker/// By default it's set to null so it's `Duration.zero`Duration? initialTimerDuration;
/// The time picker mode "hm", "hms" or "ms"/// By default it's set to "hm"CupertinoTimerPickerMode? timerPickerMode;
/// The timer seconds interval/// Cannot be less then 1////// Default value is 1.int timerSecondsInterval = 1;
///The max time can be set in the time picker widgetTime? maxTime;
///The min time can be set in the time picker widgetTime? minTime;
///The gap between two minutes///by default it's 1 minuteint minuteInterval = 1;
///the max date time on the date picker///by default it's nullDateTime? maxDateTime;
///the minimum date & time applied on the date picker///by default it's null///DateTime? minDateTime;
///define whether the time uses 24h or 12h format///by default it's false (12h format)///latebool use24hFormat;
///the padding that will be applied to the button///if the padding is null the button will be rendered null@Deprecated('Use buttonBuilder instead')
finaldouble? buttonPadding;
///the width that will be applied to the button///if the buttonWidth is null the button will be rendered with null@Deprecated('Use buttonBuilder instead')
finaldouble? buttonWidth;
///the bottom picker background color,///by default it's white///finalColor backgroundColor;
///date order applied on date picker or date time picker///by default it's YYYY/MM/DDDatePickerDateOrder? dateOrder;
///the picker text style applied on all types of bottom picker///by default `TextStyle(fontSize: 14)`TextStyle? pickerTextStyle;
/// The picker theme datafinalCupertinoTextThemeData? pickerThemeData;
///define the picker item extent available only for list items picker///by default it's 35latedouble itemExtent;
///the layout orientation of the bottom picker///by default the orientation is set to LTR///```///LAYOUT_ORIENTATION.ltr,///LAYOUT_ORIENTATION.rtl///```TextDirection? layoutOrientation;
///THe alignment of the bottom picker button///by default it's `MainAxisAlignment.center`@Deprecated('Use buttonBuilder instead')
finalMainAxisAlignment buttonAlignment;
///bottom picker main widget height///if it's null the bottom picker will get the height from///[bottomPickerHeight] extension on contextfinaldouble? height;
///invoked when pressing on the submit button when using range picker///it return two dates (first date, end date)///required when using [BottomPicker.range]lateFunction(DateTime?, DateTime?)? onRangeDateSubmitPressed;
///the minimum first date in the date range picker///not required if null no minimum will be set in the date pickerDateTime? minFirstDate;
///the minimum second date in the date range picker///not required if null no minimum will be set in the date pickerDateTime? minSecondDate;
///the maximum first date in the date range picker///not required if null no minimum will be set in the date pickerDateTime? maxFirstDate;
///the maximum second date in the date range picker///not required if null no minimum will be set in the date pickerDateTime? maxSecondDate;
///the initial first date in the date range picker///not required if null no minimum will be set in the date pickerDateTime? initialFirstDate;
///the initial last date in the date range picker///not required if null no minimum will be set in the date pickerDateTime? initialSecondDate;
/// A widget overlaid on the picker to highlight the currently selected entry./// The [selectionOverlay] widget drawn above the [CupertinoPicker]'s picker/// wheel.Widget? selectionOverlay;
///The button's widget that will be displayed///if null the button will have a simple 'Select' text in the center@Deprecated('Use buttonBuilder instead')
finalWidget? buttonContent;
///indicates if the submit button will be displayed or not///by default the submit button is shown@Deprecated('Use buttonBuilder instead')
latebool displaySubmitButton;
///a single color will be applied to the button instead of the gradient///themes@Deprecated('Use buttonBuilder instead')
finalColor? buttonSingleColor;
///to set a custom button theme color use this list///when it's not null it will be applied///finalList<Color>? gradientColors;
/// The style that will be applied on the button's widget@Deprecated('Use buttonBuilder instead')
finalBoxDecoration? buttonStyle;
/// The button builder callback that will be used to build the button widget./// If this is provided, it will override the default button widget and any other button-related properties/// The callback takes: /// - [BuildContext] context: The build context of the button./// - [BottomPicker] instance: The instance of the BottomPicker widget./// and returns a [Widget] that will be used as the button./// If it's null, the default button widget will be used (will be removed in the future).finalWidgetFunction(BottomPicker instance, BuildContext context)?
buttonBuilder;
/// Invoked when pressing on the submit button when using range picker/// it return two dates (first time, end time)/// required when using [BottomPicker.rangeTime]lateFunction(DateTime?, DateTime?)? onRangeTimeSubmitPressed;
/// Function invoked when the picker is dismissed used with range picker/// and time range picker.lateFunction(DateTime?, DateTime?)? onRangePickerDismissed;
///the minimum first time in the time range picker///not required if null no minimum will be set in the time pickerDateTime? minFirstTime;
///the minimum second time in the time range picker///not required if null no minimum will be set in the time pickerDateTime? minSecondTime;
///the maximum first time in the time range picker///not required if null no minimum will be set in the time pickerDateTime? maxFirstTime;
///the maximum second time in the time range picker///not required if null no minimum will be set in the time pickerDateTime? maxSecondTime;
///the initial first time in the time range picker///not required if null no minimum will be set in the time pickerDateTime? initialFirstTime;
///the initial last time in the time range picker///not required if null no minimum will be set in the time pickerDateTime? initialSecondTime;
/// Indicates whether the time seperator (":") will be shown or not.bool showTimeSeparator = false;
/// Indiacate whether the bottom picker will be closed (poped out of the Navigator)/// when the submit button is pressed./// By default closeOnSubmit = true.bool? closeOnSubmit;
/// The datepicker calendar typeList<int> calendarDays = CupertinoDatePickerWidget.fullWeek;
/// The bottom picker selector diameter ratio.finaldouble diameterRatio;
/// A predicate that can be used to select which hours are selectable.SelectableHourPredicate? hourPredicate;
/// Indicates whether to use SafeArea to avoid content overflow.finalbool useSafeArea;
⚙️ API Reference
The above section contains the complete parameter documentation. Refer to it for detailed API information.