2017-05-08 67 views

回答

2

考虑将您的RaisedButton换成。除了让该按钮成为其固有宽度外,还可以使用通过使用构造函数的参数mainAxisAlignment来水平定位按钮。例如右对齐按钮,使用此:

  new ListView(
      children: <Widget>[ 
       new Row(
       mainAxisAlignment: MainAxisAlignment.end, 
       children: [ 
        new RaisedButton(
        child: const Text('1'), 
        onPressed:() { /* ... */ }, 
       ), 
       ], 
      ), 
      ], 
     ),