gpt4 book ai didi

flutter - 如何在 flutter 中的行之间写 OR

转载 作者:行者123 更新时间:2023-12-05 09:30:59 24 4
gpt4 key购买 nike

大家好,我是 Flutter 的新手,我尝试在水平线上编写 OR,如图所示,但我不知道该怎么做,我尝试用谷歌搜索,但没有成功帮助过我 example demonstration

注: OR 居中

最佳答案

试试下面的代码希望对你有帮助。您必须使用这种(-- 或 -- )类型的设计 ExpandedFlexible Widget

here对于 Expanded Widget 和 here用于灵活小部件

  Padding(
padding: EdgeInsets.all(8.0),
child: Row(
children: [
Expanded(
child: Divider(
color: Colors.black,
thickness: 1,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text('OR'),
),
Expanded(
child: Divider(
color: Colors.black,
thickness: 1,
),
),
],
),
),

你的结果屏幕像 -> enter image description here

关于flutter - 如何在 flutter 中的行之间写 OR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69153957/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com