bottom_sheet
4.0.4, released 3 years ago by surf.ru
Flexible bottom sheet that can be resized and scrolled.
What it does
Provides a custom bottom sheet widget that can be resized in response to drag gestures and scrolled even without a list. Includes options for sticky headers and height based on content.
AI-written summary of version 4.0.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a bottom sheet that is both draggable and scrollable.
- You require sticky headers inside your bottom sheet.
- You want custom anchor points and flexible sizing for bottom sheets.
Skip it when
- Standard platform modal bottom sheets fulfill all your requirements without extra customization.
- You do not need drag resizing or custom scrolling behavior.
Strengths
- Can be resized via drag gestures and scrolled even without a list.
- Supports sticky headers via `showStickyFlexibleBottomSheet`.
- Customizable anchors, minimum, initialization, and maximum heights.
Weaknesses
- Adds an external dependency (`bottom_inset_observer`) for keyboard and inset handling.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
No native configuration steps required.
showFlexibleBottomSheet(
minHeight: 0,
initHeight: 0.5,
maxHeight: 1,
context: context,
builder: (context, scrollController, bottomSheetOffset) {
return Material(
child: ListView(
controller: scrollController,
children: const [ListTile(title: Text('Item'))],
),
);
},
anchors: [0, 0.5, 1],
isSafeArea: true,
);Alternatives
Packages that do the same job and could replace bottom_sheet.
- sheet
A fully customizable draggable bottom sheet for Flutter.
73Compare - country_picker
A Flutter widget to pick a country from a list with optional phone code and search.
78Compare - flutter_easy_dialogs
Show overlay dialogs, tooltips, and alerts anywhere in a Flutter app without requiring BuildContext.
75Compare - slinky_view
A bottom sheet widget that expands upward as the user scrolls.
45Compare