Reputation: 67
Is there any way of increasing height of app bar according to safe area in flutter cause the text in Center looks weird.
Upvotes: 3
Views: 4228
Reputation: 421
you can use toolbarHeight
AppBar(
toolbarHeight: 100,
title: Text('Main Page')
)
Upvotes: 4
Reputation: 1441
Yes you can do this like using below code. Put PreferredSize
widget as a parent of AppBar
and set a height.
appBar: PreferredSize(
preferredSize: Size.fromHeight(150.0),
child: AppBar(
title: Text('appbar'),
),
),
Upvotes: 1