码:
new Container( alignment: FractionalOffset.center, child: new Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ new FlatButton( child: new Text('Don\'t have an account?', style: new TextStyle(color: Color(0xFF2E3233))), ), new FlatButton( child: new Text('Register.', style: new TextStyle(color: Color(0xFF84A2AF), fontWeight: FontWeight.bold),), onPressed: moveToRegister, ) ], ), ),
如何确定两个FlatButton元素并排放置在屏幕宽度中心之间没有空格?
FlatButton
删除空间-:
new Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ GestureDetector( child: new Text('Don\'t have an account?', style: new TextStyle(color: Color(0xFF2E3233))), onTap: () {}, ), GestureDetector( onTap: (){}, child: new Text( 'Register.', style: new TextStyle( color: Color(0xFF84A2AF), fontWeight: FontWeight.bold), )) ], ),
要么
GestureDetector( onTap: (){}, child: new Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text('Don\'t have an account?', style: new TextStyle(color: Color(0xFF2E3233))), new Text( 'Register.', style: new TextStyle( color: Color(0xFF84A2AF), fontWeight: FontWeight.bold), ) ], ), ),