I am having a problem where I can’t decrease the SliverAppBar
as I need. I found out that it has some kind of minHeight constraint that has to deal with some animation and layout stuff. I have a TextButton.icon
and some Text
in it which don’t take up much space. I need the behavior of the SliverAppBar
of floating
. Is there a way to decrease the height freely without any constraints?
2
Answers
You can use
SliverToBoxAdapter
and then use aSizedbox
or for more flexibility you can useSliverPersistentHeader
.And use like
You can set set custom SliverAppBar height and expanded app bar height by using this approach simply and can use your expanded area .
Here is sample code