1.限制最大高度500,当布局高度小于500时高度自适应包裹
//当布局外不需要包裹Container时,使用ConstrainedBox(constraints: BoxConstraints(maxHeight: 500,minHeight: 0),child: Column())
_body(){
return Container(
constraints: BoxConstraints(maxHeight: 500,minHeight: 0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10)
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 40.w),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(width: 10),
Expanded(
child: Text(
'选择二维码',
style: TextStyle(
fontSize: 30.sp,
color: JadeColors.grey_2,
fontWeight: FontWeight.w600,
),
textAlign:</
Flutter Column嵌套ListView高度自适应解决方案

最低0.47元/天 解锁文章
8008

被折叠的 条评论
为什么被折叠?



