Want to replace title with image in AppBar in Flutter? The title property takes a Widget, so you can pass any widget to it.
For example an image added to assets:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | appBar: AppBar( title: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Image.asset( 'assets/logo.png', fit: BoxFit.contain, height: 32, ), Container( padding: const EdgeInsets.all(8.0), child: Text('YourAppTitle')) ], ), ) |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.