How to fix an app bar that is not center in flutter
136
mainAxisSize: MainAxisSize.min,
You need this inside your Row widget and it'll be centered perfectly.
Author by
Admin
Updated on December 12, 2022Comments
-
Admin over 1 year
when ever I open my Reorders page, my app bar title is not center because of the back button so I'm wondering how can I make the app bar to always center like so that it will be the same with other screens.
Any Help or suggestion will be really appreciated.
appBar: AppBar( centerTitle: true, title: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text( "Maxis", style: TextStyle(fontFamily: "Raleway", fontWeight: FontWeight.w300), ), Image.asset( "assets/images/maxis.png", width: 30, ), Text( "Mobile", style: TextStyle(fontFamily: "Raleway", fontWeight: FontWeight.w300), ), ], ), ),