布局类Widget 弹性布局Flex

例:假如有三个按钮,想让三个按钮占据一行,则

          body: Row(
            children: <Widget>[
                Expanded(
                  child: new RaisedButton(
                    onPressed: (){
                      
                    },
                    color:Colors.redAccent,
                    child:new Text('红色按钮')
                  ),
                ),
                Expanded(
                  child:new RaisedButton(
                    onPressed: (){
                  
                    },
                    color:Colors.orangeAccent,
                    child: new Text('黄色按钮'),
                  ),
                ),
                Expanded(
                  child:new RaisedButton(
                    onPressed: (){
                    
                    },
                    color:Colors.pinkAccent,
                    child:new Text('粉色按钮')
                  ) 
                )
              ],
            ),
expanded(
  child:,
  flex:1
)
原文地址:https://www.cnblogs.com/shui1993/p/11139914.html