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

scrolling issues with two SliverMasonryGrid.count in the same CustomScrollView #335

Open
moisesbinzie opened this issue Jan 30, 2024 · 6 comments

Comments

@moisesbinzie
Copy link

There are scrolling issues when you add two SliverMasonryGrid.count in the same CustomScrollView Widget

@kawi15
Copy link

kawi15 commented Feb 19, 2024

Did you found any solution for this?

@moisesbinzie
Copy link
Author

moisesbinzie commented Feb 19, 2024 via email

@kawi15
Copy link

kawi15 commented Feb 21, 2024

I used another package https://pub.dev/packages/masonry_grid.
It's has some performance issues but scrolling working properly.

@moisesbinzie
Copy link
Author

moisesbinzie commented Feb 22, 2024 via email

@PrimakPavel
Copy link

Have the same issue. Please, fix its

@frankfancode
Copy link

I'm experiencing a scrolling issue on my device. When the second SliverMasonryGrid appears and I scroll to the bottom, the CustomScrollView automatically scrolls back to the top.

Here's my current workaround: I replaced the first SliverMasonryGrid with a MasonryGridView, and this resolved the issue.

SliverToBoxAdapter(
  child: MasonryGridView.count(
    shrinkWrap: true,
    physics: const NeverScrollableScrollPhysics(),
    crossAxisCount: 2,
    padding: EdgeInsets.zero,
    mainAxisSpacing: 8.w,
    crossAxisSpacing: 8.w,
    itemCount: childCount,
    itemBuilder: (BuildContext context, int index) {
      return item();
    }
  ),
)

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

No branches or pull requests

4 participants