Flutter: A RenderFlex overflowed by 42 pixels on the bottom.

Flutter:渲染活动底部上方溢出了42个像素

Flutter 控件超出异常:A RenderFlex overflowed by 42 pixels on the bottom.
解决方案

1.Scaffold内添加 resizeToAvoidBottomInset 属性,缺点是软键盘下面的控件被挡住

Scaffold(

resizeToAvoidBottomInset: false, //添加这一行

appBar: AppBar(

title: Text('Expenses Tracker'),

),

body: Column(

children: [

... // other widgets

],

),

);

2.SingleChildScrollView滚动性插件作过渡层

Scaffold(

appBar: AppBar(

title: Text('Expenses Tracker'),

),

body: SingleChildScrollView(

child: Column(

children: [

... // other widgets

],

),

),

);

相关推荐
早起的年轻人39 分钟前
Flutter String 按 ,。分割
flutter
helloxmg11 小时前
鸿蒙harmonyos next flutter通信之MethodChannel获取设备信息
flutter
helloxmg11 小时前
鸿蒙harmonyos next flutter混合开发之开发package
flutter·华为·harmonyos
lqj_本人1 天前
flutter_鸿蒙next_Dart基础②List
flutter
lqj_本人1 天前
flutter_鸿蒙next_Dart基础①字符串
flutter
The_tuber_sadness1 天前
【Flutter】- 基础语法
flutter
helloxmg2 天前
鸿蒙harmonyos next flutter通信之BasicMessageChannel获取app版本号
flutter
linpengteng2 天前
使用 Flutter 开发数字钱包应用(Dompet App)
前端·flutter·firebase