How to align text in a button in flutter?
You should put your 'Text' in 'Align' to align your text left, right, top, bottom etc. As-
FlatButton( color: Colors.blue, textColor: Colors.white, padding: EdgeInsets.all(8.0), splashColor: Colors.blueAccent, onPressed: () { /*...*/ }, child: Align( alignment: Alignment.center, child: Text( "Flat", style: TextStyle(fontSize: 20.0), textAlign: TextAlign.center ), ))
It works for me
ButtonTheme( child: FlatButton( padding: EdgeInsets.all(0), child: Align( alignment: Alignment.centerLeft, child: Text( "Button text", style: TextStyle( color: ThemeColors.primaryDark, fontWeight: FontWeight.normal, fontSize: ThemeSizes.normalFont, ), textAlign: TextAlign.left, ), ), onPressed: () => _doSomething(), ), )