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
],
),
),
);

你可能感兴趣的:(flutter,渲染活动底部溢出)