【发布时间】:2021-03-22 23:30:20
【问题描述】:
我如何使用颤振在屏幕截图中创建条形显示。下面[在此处输入图片说明][1]
[1]:https://i.stack.imgur.com/dXKsm.png`enter 此处代码`
Row(
children: [
Expanded(
child: SizedBox(
child: Text("CONTACT US",
style: TextStyle(color: Colors.white),
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 30.0),
child: SizedBox(
child: Text("SOCIAL MEDIA", style: TextStyle(color: Colors.white),),
),
)
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 30.0),
child: SizedBox(
child: Text("NEWSLETTER", style: TextStyle(color: Colors.white),),
),
)
),
],
),
【问题讨论】:
-
你需要创建一个包含 3 个子元素的 Row,这 3 个子元素将是一个 Column,并且该列的子元素是你的元素。然后您可以将所有内容包装到一个容器中并提供首选背景。
-
Emanuel 开发者,你有例子吗?给我示例布局。