diff --git a/CHANGELOG.md b/CHANGELOG.md
index d5486e4..47d85e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,29 +1,53 @@
+## [4.2.0] - 07/07/2026
+
+### Features
+
+- Add a search field display to filter the items in the simple picker. [PR#173](https://github.com/koukibadr/Bottom-Picker/pull/173)
+- Add `filterPredicate` attribute to filter the items in the simple picker. [PR#173](https://github.com/koukibadr/Bottom-Picker/pull/173)
+- Add `textInputAction` attribute to customize the search field action button. [PR#173](https://github.com/koukibadr/Bottom-Picker/pull/173)
+- Add `searchFieldDecoration` attribute to customize the search field decoration. [PR#173](https://github.com/koukibadr/Bottom-Picker/pull/173)
+- Add `itemBuilder` callback that render the item in the simple picker, allowing to use any type of object as item in the simple picker. [PR#173](https://github.com/koukibadr/Bottom-Picker/pull/173)
+- Add `buttonBuilder` callback that render the submit button with `instance` and `context` attributes instead of built-in button with basic functionality, to give developer full control over the button appearance and behavior. [PR#174](https://github.com/koukibadr/Bottom-Picker/pull/174)
+
+### Changes
+
+- Remove all deprecated attributes related to title and description rendering.
+- Bottom Picker now support generic type for the simple picker, allowing to use any type of object as item in the simple picker.
+- Expose `currentValue` attribute to get the selected value in the simple picker, year picker, date picker, and time picker. [PR#176](https://github.com/koukibadr/Bottom-Picker/pull/176)
+- Expose `currentFirstDateTime` and `currentSecondDateTime` attributes to get the selected values in the range date picker and range time picker. [PR#176](https://github.com/koukibadr/Bottom-Picker/pull/176)
+- Improved modal dismissal handling with a dedicated dismiss() method and safer lifecycle tracking [PR#174](https://github.com/koukibadr/Bottom-Picker/pull/174)
+
+### Bug Fixes
+
+- Refined date selection behavior to better respect allowed calendar days [PR#176](https://github.com/koukibadr/Bottom-Picker/pull/176)
+- Simplified picker headers and removed the separate close button area [PR#176](https://github.com/koukibadr/Bottom-Picker/pull/176)
+
## [4.1.1] - 23/08/2025
-**Bug Fix**
+### Bug Fixes
- add SafeArea flag to show or hide safe area widget from bottom picker widget tree and bottom sheet. [ISSUE#163](https://github.com/koukibadr/Bottom-Picker/issues/163)
## [4.1.0] - 09/08/2025
-**Features**
+### Features
- Add hour predicate attribute to datetime picker [PR#161](https://github.com/koukibadr/Bottom-Picker/pull/161) [ISSUE#160](https://github.com/koukibadr/Bottom-Picker/issues/160)
-**Bug Fix**
+### Bug Fixes
- Resolve initial time initialization in date time picker [PR#159](https://github.com/koukibadr/Bottom-Picker/pull/159) [ISSUE#158](https://github.com/koukibadr/Bottom-Picker/issues/158)
- add SafeArea to prevent content overflow in edge-to-edge mode [PR#159](https://github.com/koukibadr/Bottom-Picker/pull/159)
## [4.0.1] - 31/07/2025
-**Bug Fix**
+### Bug Fixes
- Resolve `EdgeInsetsGeometry.zero` build issue [ISSUE#156](https://github.com/koukibadr/Bottom-Picker/issues/156)
## [4.0.0] - 26/07/2025
-**Features**
+### Features
- Add filter for unpick or block some days [PR#150](https://github.com/koukibadr/Bottom-Picker/pull/150) [ISSUE#148](https://github.com/koukibadr/Bottom-Picker/issues/148)
- Transform `pickerTitle` into an optional header builder callback [PR#146](https://github.com/koukibadr/Bottom-Picker/pull/146)
@@ -33,38 +57,38 @@
- Refactor cupertino date enum using Flutter cupertino enum instead of custom enum
- Add `diameterRatio` parameter for simple picker display [PR#154](https://github.com/koukibadr/Bottom-Picker/pull/154)
-**Bug Fix**
+### Bug Fixes
- `selectedItemIndex` parameters does not work for simple picker
- Resolve issue regarding `seleectedIndex` for Web and desktop platforms
## [3.2.1] - 05/06/2025
-**Bug Fix**
+### Bug Fixes
- Remove `debugLabel` attribute from `CupertinoDatePickerWidget` to support older flutter versions [PR#136](https://github.com/koukibadr/Bottom-Picker/pull/136) [Issue#135](https://github.com/koukibadr/Bottom-Picker/issues/135)
## [3.2.0] - 18/05/2025
-**Changes:**
+### Changes
- Add `closeWidget` attribute to replace default close widget icon [PR#128](https://github.com/koukibadr/Bottom-Picker/issues/128) [PR#133](https://github.com/koukibadr/Bottom-Picker/pull/133).
## [3.1.0] - 22/04/2025
-**Changes:**
+### Changes
-- Integrate a cupertino picker in the package with extra parameters to display a time seperator ":" with a flag attribute `showTimeSeparator`.
+- Integrate a cupertino picker in the package with extra parameters to display a time separator ":" with a flag attribute `showTimeSeparator`.
- Update default `itemExtent` value to 30 for all time and date pickers
- Add `itemExtent` attribute to time and range constructors for more picker customization.
-**Bug Fixes:**
+### Bug Fixes
-- Fix cupertino picker time seperator rendering and text style.
+- Fix cupertino picker time separator rendering and text style.
## [3.0.0] - 06/04/2025
-**Changes**
+### Changes
- Create new timer picker using `CupertinoTimerPicker` under the hood with `onChange` and `onSubmit` supporting the `Duration` result type [PR#123](https://github.com/koukibadr/Bottom-Picker/pull/123).
diff --git a/README.md b/README.md
index fb40d14..34eb642 100644
--- a/README.md
+++ b/README.md
@@ -1,63 +1,142 @@
-# Bottom Picker
+# 🎯 Bottom Picker
-
-
-
-Bring beautiful bottom pickers to all your Flutter apps! Version 4.0.0 offer full customization alongside more advanced features for cupertino picker.
-
+
-|  |  |
-| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
-|  |  |
-|  |  |
+A comprehensive and highly customizable bottom sheet picker widget for Flutter that brings beautiful, native-like pickers to all platforms.
-## Features
+[](https://pub.dev/packages/bottom_picker)
+[](https://github.com/koukibadr/Bottom-Picker/blob/main/LICENSE)
+[](https://github.com/koukibadr/Bottom-Picker)
+
+

+
+**Version 4.2.0** — Full customization with advanced Cupertino picker features
+
+
+
+---
+
+## 📱 Screenshots
+
+| Simple Item Picker | Date & Time Picker |
+| :---: | :---: |
+|  |  |
+
+| Time Picker | Date Picker |
+| :---: | :---: |
+|  |  |
+
+| Range Picker (Arabic) | Range Picker |
+| :---: | :---: |
+|  |  |
+
+---
+
+## 📖 Table of Contents
+
+- [✨ Features](#-features)
+- [🚀 Quick Start](#-quick-start)
+- [📦 Installation](#-installation)
+- [🎯 Usage Examples](#-usage-examples)
+- [⚙️ API Reference](#%EF%B8%8F-api-reference)
+- [🛠️ Customization Guide](#%EF%B8%8F-customization-guide)
+- [🤝 Contributing](#-contributing)
+- [👏 Credits](#-credits)
+
+---
+
+## ✨ Features
### Core Picker Types
-* Simple list picker wheel
-* Date picker
-* Dedicated Year picker
-* Month and year picker
-* Date range picker (RTL and LTR)
-* Time picker
-* Duration Timer picker
-* Date and Time picker
-
-### Customization & Behavior
-
-* 24h / 12h time format support
-* Filter options for unpickable or blocked dates
-* Customizable header/title via an optional builder callback
-* Control auto-closing of the picker on submit
-* Customize confirm button
-* Customize first selected item
-* Customize background color
-* Customize date format order
-* Customize picker text style (color, font size, font weight, etc.)
-* Customize close button style and display
-* Customize layout orientation (LTR / RTL)
-* Customizable bottom picker height
-* Customizable `minuteInterval` attribute
-
-### Platform Support & Theming
-
-* Fully support Web and Desktop platforms (using wheel views)
-* Built-in themes
-* Enhanced tablet view
-
-## Getting Started
-
-To add bottom picker to your project add this line to your pubspec.yaml file
+- ✅ Simple list picker wheel with custom objects
+- ✅ Date picker (configurable date order)
+- ✅ Dedicated year picker
+- ✅ Month and year picker
+- ✅ Date range picker (RTL and LTR support)
+- ✅ Time picker (12h/24h formats)
+- ✅ Duration timer picker
+- ✅ Date and time combined picker
+- ✅ Time range picker
+- ✅ Search functionality for item pickers
+
+### Customization Options
+
+- 🎨 Fully customizable button, header and items display
+- 🎨 Complete ownership of the rendering of items, buttons and headers
+- 🎨 Multiple built-in themes (Blue, Orange, Azure, Rain, Plum, Salad)
+- 🎨 Custom gradient colors and single color button options
+- 🎨 Customizable text styles (font size, weight, color)
+- 🎨 Custom header and button builders for full control
+- 🎨 Adjustable picker height and item extent
+- 🎨 Background color customization
+- 🎨 Selection overlay widget support
+- 🎨 Layout orientation control (LTR/RTL)
+
+### Advanced Features
+
+- 🔍 Built-in search/filter functionality for item pickers
+- 📅 Date range filtering with min/max constraints
+- ⏰ Time range filtering with minute intervals
+- 🔒 Selectable hours predicate for time pickers
+- 🚀 Auto-closing or manual control on submit
+- 🛡️ SafeArea support
+- 📱 Full support for Web, Desktop, and Mobile platforms
+- 📱 Enhanced tablet view support
+- 🌍 RTL (Right-to-Left) support for international apps
+
+---
+
+## 🚀 Quick Start
+
+The simplest way to get started with Bottom Picker:
+
+```dart
+import 'package:bottom_picker/bottom_picker.dart';
+
+// Simple item picker
+BottomPicker(
+ items: ['Item 1', 'Item 2', 'Item 3'],
+ onSubmit: (selectedItem) => print('Selected: $selectedItem'),
+).show(context);
+
+// Date picker
+BottomPicker.date(
+ initialDateTime: DateTime.now(),
+ onSubmit: (selectedDate) => print('Selected: $selectedDate'),
+).show(context);
+
+// Time picker
+BottomPicker.time(
+ initialTime: Time(h: 12, m: 0),
+ onSubmit: (time) => print('Selected: ${time.h}:${time.m}'),
+).show(context);
+```
+
+---
+
+## 📦 Installation
+
+Add `bottom_picker` to your `pubspec.yaml` file:
```yaml
dependencies:
- bottom_picker: ^4.1.0
+ bottom_picker: ^4.2.0
+```
+
+Then run:
+
+```bash
+flutter pub get
```
-## Parameters
+---
+
+## 🎯 Usage Examples
-````dart
+### Package Attributes
+
+```dart
/// Renders the header component of the bottom picker
final Widget Function(BuildContext context)? headerBuilder;
@@ -70,23 +149,39 @@ dependencies:
///and should not be empty or null
///
///for date/dateTime/time items parameter is not available
- ///
- late List? items;
+ late List? 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() value
+ Widget Function(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)
- ///
- late Function(dynamic)? onChange;
+ late Function(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? 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 item
- ///
- late Function(dynamic)? onSubmit;
+ late Function(T?)? onSubmit;
/// Nullable function invoked when the picker get dismissed
/// it will return the selected value
- late Function(dynamic)? onDismiss;
+ late Function(T?)? onDismiss;
+
+ ///Invoked when clicking on the close button
+ Function? onCloseButtonPressed;
///set the theme of the bottom picker (the button theme)
///possible values
@@ -158,10 +253,12 @@ dependencies:
///the padding that will be applied to the button
///if the padding is null the button will be rendered null
+ @Deprecated('Use buttonBuilder instead')
final double? 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')
final double? buttonWidth;
///the bottom picker background color,
@@ -173,6 +270,10 @@ dependencies:
///by default it's YYYY/MM/DD
DatePickerDateOrder? dateOrder;
+ ///the picker text style applied on all types of bottom picker
+ ///by default `TextStyle(fontSize: 14)`
+ TextStyle? pickerTextStyle;
+
/// The picker theme data
final CupertinoTextThemeData? pickerThemeData;
@@ -190,6 +291,7 @@ dependencies:
///THe alignment of the bottom picker button
///by default it's `MainAxisAlignment.center`
+ @Deprecated('Use buttonBuilder instead')
final MainAxisAlignment buttonAlignment;
///bottom picker main widget height
@@ -200,7 +302,7 @@ dependencies:
///invoked when pressing on the submit button when using range picker
///it return two dates (first date, end date)
///required when using [BottomPicker.range]
- late Function(DateTime, DateTime)? onRangeDateSubmitPressed;
+ late Function(DateTime?, DateTime?)? onRangeDateSubmitPressed;
///the minimum first date in the date range picker
///not required if null no minimum will be set in the date picker
@@ -233,15 +335,17 @@ dependencies:
///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')
final Widget? buttonContent;
///indicates if the submit button will be displayed or not
///by default the submit button is shown
+ @Deprecated('Use buttonBuilder instead')
late bool displaySubmitButton;
///a single color will be applied to the button instead of the gradient
///themes
- ///
+ @Deprecated('Use buttonBuilder instead')
final Color? buttonSingleColor;
///to set a custom button theme color use this list
@@ -250,16 +354,27 @@ dependencies:
final List? gradientColors;
/// The style that will be applied on the button's widget
+ @Deprecated('Use buttonBuilder instead')
final BoxDecoration? 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).
+ final Widget Function(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]
- late Function(DateTime, DateTime)? onRangeTimeSubmitPressed;
+ late Function(DateTime?, DateTime?)? onRangeTimeSubmitPressed;
/// Function invoked when the picker is dismissed used with range picker
/// and time range picker.
- late Function(DateTime, DateTime)? onRangePickerDismissed;
+ late Function(DateTime?, DateTime?)? onRangePickerDismissed;
///the minimum first time in the time range picker
///not required if null no minimum will be set in the time picker
@@ -290,7 +405,6 @@ dependencies:
/// 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;
@@ -305,15 +419,26 @@ dependencies:
/// Indicates whether to use SafeArea to avoid content overflow.
final bool useSafeArea;
-````
+```
+
+---
+
+## ⚙️ API Reference
+
+The above section contains the complete parameter documentation. Refer to it for detailed API information.
-## Examples
+---
-### Simple item picker
+## 🛠️ Customization Guide
+
+### Example: Simple Item Picker
```dart
BottomPicker(
- items: items,
+ items: List.generate(
+ 10,
+ (index) => "Country $index",
+ ),
headerBuilder: (context) {
return Row(
children: [
@@ -335,10 +460,32 @@ BottomPicker(
],
);
},
-).show(context);
```
-### DateTime picker
+
+### Example: Item Picker with Search Filter
+```dart
+ BottomPicker(
+ items: countryList,
+ itemBuilder: (item, index) {
+ return ListTile(
+ leading: CircleAvatar(
+ child: Text(item.name.substring(item.name.length - 2)),
+ ),
+ title: Text(item.name),
+ subtitle: Text('Country ID: ${item.id}'),
+ );
+ },
+ onChange: (p0) => log('Selected Item: ${p0.name}'),
+ filterPredicate: (item, value) {
+ return item.name.toLowerCase().contains(value.toLowerCase());
+ },
+ ).show(context);
+```
+
+---
+
+### Example: Date Picker
```dart
BottomPicker.date(
@@ -360,11 +507,11 @@ BottomPicker.date(
initialDateTime: DateTime(1996, 10, 22),
maxDateTime: DateTime(1998),
minDateTime: DateTime(1980),
- onChange: (index) {
- print(index);
+ onChange: (date) {
+ print(date);
},
- onSubmit: (index) {
- print(index);
+ onSubmit: (date) {
+ print(date);
},
onDismiss: (p0) {
print(p0);
@@ -373,8 +520,9 @@ BottomPicker.date(
).show(context);
```
-### Year picker
+---
+### Example: Year Picker
```dart
BottomPicker.year(
headerBuilder: (context) {
@@ -394,11 +542,11 @@ BottomPicker.year(
initialDateTime: DateTime(1996),
maxDateTime: DateTime(1998),
minDateTime: DateTime(1980),
- onChange: (index) {
- print(index);
+ onChange: (selectedYear) {
+ print(selectedYear);
},
- onSubmit: (index) {
- print(index);
+ onSubmit: (selectedYear) {
+ print(selectedYear);
Navigator.pop(context);
},
onDismiss: (p0) {
@@ -408,63 +556,56 @@ BottomPicker.year(
).show(context);
```
-### Custom days picker
+For more comprehensive examples, visit the [example folder](https://github.com/koukibadr/Bottom-Picker/tree/main/example).
-```dart
-BottomPicker.dateTime(
- headerBuilder: (context) {
- return Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Text(
- 'Set the event exact time and date',
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: 15,
- color: Colors.black,
- ),
- ),
- InkWell(
- onTap: () {
- print('Picker closed');
- Navigator.pop(context);
- },
- child: Text(
- 'close',
- style: TextStyle(
- decoration: TextDecoration.underline,
- ),
- ),
- ),
- ],
- );
- },
- onSubmit: (date) {
- print(date);
- },
- calendarDays: CupertinoDatePickerWidget.workDays,
-).show(context);
-```
+---
-## Contributing
+## 🤝 Contributing
We warmly welcome contributions to the `bottom_picker` package! Your help in making it even better is highly appreciated.
-**How you can contribute:**
+#### Ways to Contribute
+
+**🐛 Bug Reports**
+- [Open a new bug report](https://github.com/koukibadr/Bottom-Picker/issues/new?assignees=&labels=bug&template=bug_report.md&title=)
+- Include clear steps to reproduce the problem
+- Provide as much detail as possible
+
+**✨ Feature Requests**
+- [Suggest a new feature](https://github.com/koukibadr/Bottom-Picker/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=)
+- Explain the use case and benefit to users
+- Open an issue for discussion before implementation
-* **Found a bug?** Please [open a new issue](https://github.com/koukibadr/Bottom-Picker/issues/new?assignees=&labels=bug&template=bug_report.md&title=) with clear steps to reproduce the problem. The more detail you provide, the easier it will be to fix.
-* **Have a great idea for a new feature?** We'd love to hear it! Please [open a new issue](https://github.com/koukibadr/Bottom-Picker/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=) to discuss your suggestion. Explain the use case and how it would benefit users.
-* **Want to get your hands dirty and contribute code?** Fantastic! Here's how:
- 1. Fork the [repository](https://github.com/koukibadr/Bottom-Picker).
- 2. Create a new branch for your feature or bug fix.
- 3. Make your changes, ensuring you follow the project's coding style and conventions.
- 4. Write clear and concise commit messages.
- 5. Submit a [pull request](https://github.com/koukibadr/Bottom-Picker/pulls) with a detailed description of your changes and why they should be merged.
+**💻 Code Contributions**
+1. [Fork the repository](https://github.com/koukibadr/Bottom-Picker)
+2. Create a new feature branch: `git checkout -b feature/your-feature-name`
+3. Make your changes and follow the project's coding conventions
+4. Write clear and descriptive commit messages
+5. Push to your fork: `git push origin feature/your-feature-name`
+6. [Submit a pull request](https://github.com/koukibadr/Bottom-Picker/pulls) with a detailed description
+7. Await feedback and be responsive to review comments
-We'll review your contributions and provide feedback as soon as possible. Thank you for your interest in improving `bottom_picker`!
+We'll review your contributions promptly and provide constructive feedback. Thank you for helping improve `bottom_picker`!
-## Bottom Picker Heros
+---
-
-
+## 👏 Credits
+
+
+
+
+---
+
+## 📄 License
+
+This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
+
+---
+
+
+
+
+⭐ If you found this package helpful, please consider giving it a star on [GitHub](https://github.com/koukibadr/Bottom-Picker)!
+
+
diff --git a/example/lib/example_widget.dart b/example/lib/example_widget.dart
index c922281..f58eb8e 100644
--- a/example/lib/example_widget.dart
+++ b/example/lib/example_widget.dart
@@ -149,7 +149,6 @@ class ExampleApp extends StatelessWidget {
void _openSimpleItemPicker(BuildContext context) {
BottomPicker(
items: countryList,
- selectedItemIndex: 5,
itemBuilder: (item, index) {
return ListTile(
leading: CircleAvatar(
@@ -159,56 +158,10 @@ class ExampleApp extends StatelessWidget {
subtitle: Text('Country ID: ${item.id}'),
);
},
- itemExtent: 70,
- headerBuilder: (context) {
- return Row(
- children: [
- Expanded(
- child: Text(
- 'Choose your country',
- style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
- ),
- ),
- InkWell(
- onTap: () {
- Navigator.pop(context);
- },
- child: Icon(Icons.close),
- ),
- ],
- );
- },
- backgroundColor: Colors.yellow.withValues(alpha: 0.6),
- bottomPickerTheme: BottomPickerTheme.morningSalad,
- onChange: (item) {
- log('== Selected Country: ${item.name}, ID: ${item.id}');
- },
- buttonBuilder: (instance, context) {
- return ElevatedButton(
- onPressed: () {
- instance.dismiss();
- log('Submit button pressed');
- },
- child: Text('Submit'),
- style: ElevatedButton.styleFrom(minimumSize: Size(100, 40)),
- );
- },
- dismissable: true,
+ onChange: (p0) => log('Selected Item: ${p0.name}'),
filterPredicate: (item, value) {
- if (int.tryParse(value) != null) {
- return item.id.toString().contains(value);
- }
return item.name.toLowerCase().contains(value.toLowerCase());
},
- searchFieldDecoration: InputDecoration(
- hintText: 'Search country',
- prefixIcon: Icon(Icons.search),
- border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
- ),
- onDismiss: (p0) {
- log('Picker dismissed');
- log('== Selected Country: ${p0?.name}, ID: ${p0?.id}');
- },
).show(context);
}
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 55d17e7..7384bdd 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -23,7 +23,7 @@ packages:
path: ".."
relative: true
source: path
- version: "4.1.1"
+ version: "4.2.0"
characters:
dependency: transitive
description:
diff --git a/lib/bottom_picker.dart b/lib/bottom_picker.dart
index 2f3c3d8..5aa77d8 100644
--- a/lib/bottom_picker.dart
+++ b/lib/bottom_picker.dart
@@ -711,7 +711,10 @@ class BottomPicker extends StatefulWidget {
/// 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 a [BuildContext] and returns a [Widget] that will be used as the button.
+ /// 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).
final Widget Function(BottomPicker instance, BuildContext context)?
buttonBuilder;
diff --git a/pubspec.yaml b/pubspec.yaml
index 30d31c7..d3ac0d0 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,7 @@
name: bottom_picker
-description: An easy way that let you create a bottom item picker or date & time picker with minmum parameters
-version: 4.1.1
+description: An easy way that let you create a bottom item picker or date & time
+ picker with minmum parameters
+version: 4.2.0
homepage: 'https://github.com/koukibadr/Bottom-Picker'
environment:
sdk: '>=2.19.0 <4.0.0'