get app bar title in flutter code example
Example 1: how to center the title of the appbar flutter
AppBar(
centerTitle: true, // this is all you need
...
)
Example 2: how to set title in appbar in flutter
appBar: AppBar(
title: Text('Sample Title'),
),
output: -------------------
| Sample Title |
--------------------
| |
| |
| |
| |
| |
--------------------