Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Slivers with Multiple Box Children #107

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NM4ik
Copy link

@NM4ik NM4ik commented Jul 19, 2024

Checklist

  • 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, resolve etc. if necessary)
  • Have the files been linted and formatted?
  • Have the docs been updated to match the changes in the PR?
  • Have the tests been updated to match the changes in the PR?
  • Attached videos/screenshots demonstrating the fix/feature.
  • 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?

  1. Changing the return value of FlexibleDraggableScrollableWidgetBodyBuilder from SliverChildDelegate to SliverMultiBoxAdaptorWidget
  2. 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:

bottom_sheet_grid_record.mov

bottom_sheet_fixeList_record.mov

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant