作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
大家好,我是 Flutter 的新手,我尝试在水平线上编写 OR
,如图所示,但我不知道该怎么做,我尝试用谷歌搜索,但没有成功帮助过我 example demonstration
注: OR 居中
最佳答案
试试下面的代码希望对你有帮助。您必须使用这种(-- 或 -- )类型的设计 Expanded 或 Flexible 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,
),
),
],
),
),
关于flutter - 如何在 flutter 中的行之间写 OR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69153957/
我是一名优秀的程序员,十分优秀!