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

],

),

),

);

相关推荐
花燃柳卧43 分钟前
跨平台路由组件工程源码补充上传
android·flutter·kotlin
心中有国也有家2 小时前
E-Brufen 技术选型全景:Flutter + 鸿蒙 + Hive CE
hive·hadoop·学习·flutter·华为·harmonyos
Mandy的名字被占用了4 小时前
Dart 与 Flutter 快速入门指南
后端·flutter·dart
心中有国也有家8 小时前
Flutter 鸿蒙编译与构建流程深度解析
学习·flutter·华为·harmonyos
心中有国也有家1 天前
使用 DevEco Studio 配置 Flutter 鸿蒙签名
学习·flutter·华为·harmonyos
nice先生的狂想曲1 天前
Stream与StreamController以及对应的使用场景
flutter·客户端
心中有国也有家1 天前
鸿蒙Flutter开发环境从零搭建教程(Windows/macOS双平台·避坑版)
学习·flutter·华为·harmonyos
心中有国也有家1 天前
Flutter 鸿蒙适配第一步:从 hive 迁移到 hive\_ce
hive·学习·flutter·华为·harmonyos
心中有国也有家1 天前
AtomGit Flutter 鸿蒙客户端:E-Brufen 架构设计
学习·flutter·华为·harmonyos
心中有国也有家1 天前
鸿蒙 Flutter 本地存储实战:Hive CE 从入门到精讲
人工智能·hive·flutter·华为·harmonyos