Maanaav A Motiramani
Maanaav A Motiramani

Reputation: 67

Can I increase height of app bar in flutter?

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

Answers (2)

Bagus Kurnianto
Bagus Kurnianto

Reputation: 421

you can use toolbarHeight

      AppBar(
      toolbarHeight: 100,
      title: Text('Main Page')
    )

Upvotes: 4

Salim Murshed
Salim Murshed

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

Related Questions