A smart, feature-rich Flutter bottom sheet package with snap points, physics-based dragging, stacking, form, stepper, confirmation, and rating sheets.
- 🎯 Action Menu Sheet — quick actions list with icons and destructive styling
- ⚓ Snap Sheet — 3 snap points (peek, half, full) with velocity-based snapping and rubber-band physics
- 📝 Form Sheet — keyboard-aware inline forms with validation
⚠️ Confirm Sheet — thumb-friendly replacement for AlertDialog- 🪜 Stepper Sheet — multi-step flow inside a single sheet with progress indicator
- ⭐ Rating Sheet — animated star picker with optional comment field
- 🎨 Fully customizable — colors, border radius, handle, backdrop
- 🌙 Dark mode support out of the box
Add to your pubspec.yaml:
dependencies:
smart_bottom_sheet: ^1.0.0Then run:
flutter pub getImport in your Dart file:
import 'package:smart_bottom_sheet/smart_bottom_sheet.dart';ActionMenuSheet.show(
context,
title: 'File Options',
subtitle: 'document.pdf',
actions: [
SheetAction(
icon: Icons.share_rounded,
label: 'Share',
onTap: () {},
),
SheetAction(
icon: Icons.delete_rounded,
label: 'Delete',
isDestructive: true,
onTap: () {},
),
],
);SnapSheet.show(
context,
initialSnap: SnapPoint.half,
child: YourScrollableWidget(),
);FormSheet.show(
context,
title: 'Add Address',
fields: [
SheetField.text('Full Name', isRequired: true),
SheetField.phone('Phone Number', isRequired: true),
SheetField.multiline('Notes', hint: 'Any instructions?'),
],
onSubmit: (data) {
print(data['Full Name']);
},
);ConfirmSheet.show(
context,
icon: Icons.delete_rounded,
iconColor: SheetColor.danger,
title: 'Delete this item?',
message: 'This action cannot be undone.',
confirmLabel: 'Yes, Delete',
isDangerous: true,
onConfirm: () {
// handle delete
},
);StepperSheet.show(
context,
title: 'Place Order',
steps: [
SheetStep(
title: 'Bag',
child: YourBagWidget(),
),
SheetStep(
title: 'Address',
child: YourAddressWidget(),
),
SheetStep(
title: 'Payment',
child: YourPaymentWidget(),
),
],
onComplete: () {
// order placed
},
);RatingSheet.show(
context,
title: 'How was your order?',
subtitle: 'Burger King · Zomato Gold',
showComment: true,
onSubmit: (stars, comment) {
print('Rated $stars stars');
},
);Every sheet accepts a SheetConfig for global customization:
SheetConfig(
peekHeight: 90, // peek snap height in pixels
halfHeight: 0.45, // half snap as screen fraction
isDismissible: true, // swipe down to dismiss
showHandle: true, // show drag handle bar
backgroundColor: Colors.white,
borderRadius: BorderRadius.vertical(
top: Radius.circular(24),
),
)- 📦 pub.dev
- 🐛 File an issue
- 🤝 Contributions welcome — open a PR!
MIT License — see LICENSE file for details.