letsar / flutter_staggered_grid_view

A Flutter staggered grid view
MIT License
3.12k stars 508 forks source link

Overlay inside CustomScrollView #259

Closed appinteractive closed 1 year ago

appinteractive commented 2 years ago

Hey, first thanks for that great package!

I'm using a CustomScrollView with the SliverMasonryGrid inside, now I need a way to Overlay that Sliver with a Widget (full height). How do I achive that? I cant use Stack as it seems but I also did not find any other approach. Can someone give me a gentle hint?

Here a Scribble, the 3th Sliver is the Staggerd Grid View which is "deactivated"

grafik

letsar commented 2 years ago

Why don't you replace the SliverMasonryGrid upon a condition with your overlay?

appinteractive commented 2 years ago

What do you mean with replace? The grid is underneath the overlay. I can't fake it because it's still scrollable.

I was looking for a way to wrap it with another positioned element but I don't get how.

I would need to use SliverToBox but then I can't user another sliver inside that.

What I ended up doing right now is to calculate the position and place the overlay outside the scroll view.

Any better idea? Do I miss something?

letsar commented 1 year ago

Well it doesn't seem related to this package. Maybe a look to https://pub.dev/packages/sliver_tools