letsar / flutter_staggered_grid_view

A Flutter staggered grid view
MIT License
3.14k stars 510 forks source link

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

Open moisesbinzie opened 9 months ago

moisesbinzie commented 9 months ago

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

kawi15 commented 8 months ago

Did you found any solution for this?

moisesbinzie commented 8 months ago

No, I didn't. But I used different gridviews from the staggered package to achieve the layout I wanted. SliverToBox adapter with AlignedGridView.count and the and the SliverMasonaryGrid.count ..

I am limiting the list of the items being built though.

If you get a solution to this, please let me know

On Mon, 19 Feb 2024, 17:00 kawi15, @.***> wrote:

Did you found any solution for this?

— Reply to this email directly, view it on GitHub https://github.com/letsar/flutter_staggered_grid_view/issues/335#issuecomment-1952629944, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKUN4SRQWHIUQOBYCOPB33YUNSIJAVCNFSM6AAAAABCRAVWZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSGYZDSOJUGQ . You are receiving this because you authored the thread.Message ID: @.***>

kawi15 commented 8 months ago

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

moisesbinzie commented 8 months ago

That's great. I hope they fix those issues sooner.

On Wed, 21 Feb 2024, 4:35 pm kawi15, @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/letsar/flutter_staggered_grid_view/issues/335#issuecomment-1956789082, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKUN4Q72WSK3MYKXAIPS2LYUYA37AVCNFSM6AAAAABCRAVWZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJWG44DSMBYGI . You are receiving this because you authored the thread.Message ID: @.***>

PrimakPavel commented 2 months ago

Have the same issue. Please, fix its

frankfancode commented 2 weeks ago

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();
    }
  ),
)