How to display text over AppBar in flutter?

0

Issue

I want to display text message above app bar like this,

enter image description here

How can I achieve this with flutter?

Thanks in Advance!

Solution

Scaffold(
      appBar: PreferredSize(
          preferredSize: Size.fromHeight(customSize),
          child: Column(
            children: [
              Text('Connecting...'),
              AppBar(
                title: Text('Recents'),
              )
            ],
          )),
      body: content...,
    );

You can add as parent SafeArea to avoid intrusions by the operating system

Answered By – Maikzen

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More