0
点赞
收藏
分享

微信扫一扫

Flutter 实现百分比布局 OutlinedButton 与MaterialButton设置圆角

GG_lyf 2023-03-17 阅读 76


child: Padding(
padding: const EdgeInsets.all(20.0),
child: Row(
children: [
Expanded(
flex: 2,
child: OutlinedButton(
onPressed: () {},
child: Text(
"确认注销",
style: TextStyle(color: Colors.grey),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
),
side: BorderSide(width: 1, color: Colors.grey),
),
),
),
SizedBox(
width: 10,
),
Expanded(
flex: 3,
child: MaterialButton(
color: widget.color,
onPressed: () {},
child: Text(
"我再想想",
style: TextStyle(color: Colors.white),
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
),
),
),
],
),
)

Expanded

 flex 即可

Flutter 实现百分比布局 OutlinedButton 与MaterialButton设置圆角_ide

举报

相关推荐

0 条评论