flutter-bottom-sheet
flutter-bottom-sheet copied to clipboard
Support for Slivers with Multiple Box Children
Checklist
- [x] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Is there an existing issue for this PR?
-
link issue here (use keywords like
fix,close,resolveetc. if necessary)
-
link issue here (use keywords like
- [x] Have the files been linted and formatted?
- [x] Have the docs been updated to match the changes in the PR?
- [ ] Have the tests been updated to match the changes in the PR?
- [x] Attached videos/screenshots demonstrating the fix/feature.
- [x] Have you run the tests locally to confirm they pass?
New Features
Adding the ability to use slivers that support or have multiple children instead of a list of children, such as SliverGrid, SliverList, SliverFixedExtentList.
What new capabilities does this PR add?
- Changing the return value of FlexibleDraggableScrollableWidgetBodyBuilder from SliverChildDelegate to SliverMultiBoxAdaptorWidget
- Adding EdgeInsets? bodyPadding for adjusting the outer padding of the bodyBuilder.
/// [bodyPadding] padding for content's builder.
Code example:
bodyPadding: const EdgeInsets.all(30),
bodyBuilder: (_, offset) {
return SliverGrid(
delegate: SliverChildBuilderDelegate(
childCount: 10,
(context, index) {
return Container(color: Colors.blue);
},
),
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
childAspectRatio: 1,
),
);
},
Media examples:
What docs changes are needed to explain this?
I added comments for bodyPadding. Updated readme.md and example for "Sticky BottomSheet"
Thank you for your attention!