2017-05-08 28 views

回答

2

考慮將您的RaisedButton換成。除了讓該按鈕成爲其固有寬度外,還可以使用通過使用構造函數的參數mainAxisAlignment來水平定位按鈕。例如右對齊按鈕,使用此:

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