如何创建一行并插入文本中心

问题描述 投票:0回答:1

我想问一下颤动中的设计。我不知道该怎么做。我插入图像供您查看。希望你们能帮助我。

enter image description here

flutter flutter-layout
1个回答
0
投票

使用下面的代码

 Row(children: <Widget>[
              Expanded(
                child: new Container(
                    margin: const EdgeInsets.only(left: 10.0, right: 20.0),
                    child: Divider(
                      color: Colors.black,
                      height: 36,
                    )),
              ),
              Text("OR"),
              Expanded(
                child: new Container(
                    margin: const EdgeInsets.only(left: 20.0, right: 10.0),
                    child: Divider(
                      color: Colors.black,
                      height: 36,
                    )),
              ),
            ]),
© www.soinside.com 2019 - 2024. All rights reserved.