A Flutter package to create highly customizable, reusable bottom sheets with features like titles, subtitles, drag gestures (pill indicator), and option lists. Designed to help you create elegant and flexible modal bottom sheets faster.
- Adaptive & customizable bottom sheets
- Title and subtitle support
- Optional pill gesture at the top
- Scrollable content support
- Flexible height control
- Built-in option list bottom sheet
- Reusable components:
OptionEntity
,OptionItem
,OptionList
,PillGesture
Add this to your pubspec.yaml
:
reusable_bottom_sheet: <latest_version>
Import the package:
import 'package:reusable_bottom_sheet/reusable_bottom_sheet.dart';
AdaptiveBottomSheet(
context: context,
title: 'Custom Sheet',
supTitle: 'This is a subtitle',
child: const Text('Your content here'),
).show();
final selected = await showOptionBottomSheet<OptionEntity>(
context: context,
title: 'Options',
supTitle: 'Choose one',
options: [
const OptionEntity(title: 'Camera', icon: Icons.camera_alt),
const OptionEntity(title: 'Gallery', icon: Icons.photo),
const OptionEntity(title: 'Share', icon: Icons.share),
],
onTap: (option) => Navigator.pop(context, option),
);
if (selected != null) {
print("User picked: ${selected.title}");
}
Represents an option with an icon, title, and tap handler.
Widget for a single option item.
Widget to display a list of OptionItem
s.
A draggable indicator usually shown at the top of the sheet.
title
,supTitle
, and their text styles- Background color (
bgColor
) - Border radius (
borderRadius
) - Custom child widget
- Optional pill gesture (
hasPillGesture
) - Control the height with
sheetHeightFraction
This project is licensed under the MIT License.
Contributions, issues, and feature requests are welcome! Feel free to submit a pull request or open an issue.
Made with ❤️ by Shohidul Islam