Kavantix / sliver_tools

A set of useful sliver tools that are missing from the flutter framework
MIT License
637 stars 63 forks source link

SliverAppBar with expanded height dependent on the children #65

Open logic-and-math opened 1 year ago

logic-and-math commented 1 year ago

Hi, thank you for the package!

Is it possible to achieve a pinned silverappbar with the height depending on its children with this package?

What I am trying to achieve is the first example on here: https://api.flutter.dev/flutter/widgets/NestedScrollView-class.html but such that the appbar is some widget whose height is unknown(and a tabbar on the bottom) until layout/render. I know the height of the tabs, that is the collapsed height.

Thank you!

Kavantix commented 1 year ago

Hi @logic-and-math this is currently not supported by the package, a PR would be welcome though!

hamishjohnson commented 6 months ago

I'd like this too. In my case I want to have a pinned list at the top.

I'd contribute but I don't understand the inner workings of slivers. Do you have any pointers?

Kavantix commented 6 months ago

@hamishjohnson what exactly do you mean with a pinned list?

hamishjohnson commented 6 months ago

@Kavantix I mean a SliverList that is pinned at the top, so it has dynamic size but stays in the viewport as the content below is scrolled. And I'd like to limit it to a max-height before it becomes scrollable.

I can get something similar with SliverFillRemaining in the bottom but it has some problematic side effects