flutter Row里面元素居中显示

直接上代码:

              new Expanded(
                  flex: 5,
                  child: new Row(
                    children: <Widget>[
                      Expanded(
                          child: new Container(
                        alignment: Alignment.center,
                        color: Colors.black38,
                        child: new Text("這裡是logo"),
                      ))
                    ],
                  )),

 

posted on 2018-10-16 23:17  --LP--  阅读(15437)  评论(0编辑  收藏  举报

导航