flutter - 谁能告诉我如何在颤动中制作这种布局,因为我是颤动的新手,我被困在这个
解决方案
这是您的用户界面的代码
Container(
padding: const EdgeInsets.all(10),
margin: EdgeInsets.only(left: 20, right: 20),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.5),
spreadRadius: 1,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
),
],
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Hello,',
style: TextStyle(color: Colors.grey[700]),
),
Text(
'Test User',
style: TextStyle(fontWeight: FontWeight.bold),
),
],
),
Row(
children: [
Container(
margin: EdgeInsets.only(right: 10),
height: 40,
width: 3,
color: Colors.orange,
),
TextButton.icon(
style: ButtonStyle(
foregroundColor: MaterialStateProperty.all(Colors.orange),
),
onPressed: () {},
icon: Icon(Icons.rice_bowl),
label: Text('Show Card'),
),
],
),
],
),
Text(
'Lorem Ipsum is simply dummy text of the printing and typesetting industry'),
],
),
),
推荐阅读
- ios - 100% 给用户订阅的“小费”是否需要使用 IAP?
- sql - 如何从多个表中填充事实表
- amazon-web-services - Lambda 如何在不使用 AWS Cognito 的情况下授权网站用户?
- java - 在 Visual Studio 代码中导入 java 项目并获取构建路径错误。未绑定的类路径容器:JRE 系统库 jdk-8.0.202.08
- python - 为什么在顶层按住“X”按钮会停止执行 tkinter 中的主窗口?
- r - R 函数在 Linux 上无法正常运行(在 Windows 上运行良好)
- flutter - 如何防止 Flutter 中不必要的渲染?
- sas - SAS 外部联合 corr BY 使用 Do Loop
- r - R获取特定模式之间的字符串
- google-sheets - 如果一个单元格在另一个单元格的 10 以内,如何设置条件格式