7

Is it possible set a minimum height on SliverAppBar when is collapsed? If yes, how I can do that?

Work's adding a bottom widget on SliveAppBar:

bottom: PreferredSize( preferredSize: Size(20.0, 20.0), child: Text(''), ),

1 Answer 1

7

The answer to this is both yes and no. If you want to make it larger than what it currently is, you can set a 'bottom' widget which takes up some space below the main part of the app bar, so you can make it appear larger.

It isn't possible to change the height of the actual 'bar' part of the appbar though as it uses the constant kToolbarHeight to determine its height, and so there's no way to easily decrease the size of the toolbar.

That being said, flutter is open-source so you could just copy SliverAppBar & RenderSliverAppBar and change the height that way as well, although that's probably not a great idea.

1
  • 1
    Thankyou for suggest, work's fine adding a bottom widget --- bottom: PreferredSize( preferredSize: Size(20.0, 20.0), child: Text(''), ), Oct 22, 2018 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.