1、1.1.19版本一下的,可以设置resizeToAvoidBottomInset为false,键盘弹起不会resize。
Scaffold(
appBar: AppBar(''),
resizeToAvoidBottomPadding: false, //输入框抵住键盘
body:,
)
2、固定页面的的高度,将高度写死。
body: SingleChildScrollView(
child: MediaQuery.removePadding(
context: context,
removeTop: true,
removeBottom: true,
child: Container(
height: MediaQuery.of(context).size.height - 56.0 - MediaQuery.of(context).padding.bottom - MediaQuery.of(context).padding.top,
child: Container(),
)
),
旨在分享