Flutter 键盘弹出背景图片变形
2019-10-08 本文已影响0人
siyanGo
键盘弹出导致背景
解决方法
resizeToAvoidBottomInset: false,
class LoginState extends State<LoginWeight> {
@override
Widget build(BuildContext context) {
// TODO: implement build
return new Scaffold(
// 添加这行解决
resizeToAvoidBottomInset: false,
body: Stack(
children: <Widget>[
Image.asset("assets/images/login_bg.png",
height: double.maxFinite,
fit: BoxFit.fill,),
Container(
alignment: Alignment.topCenter,
child: Column(
children: <Widget>[
Image.asset("assets/images/login_title_icon.png",
width: 119,
height: 136,),
Container(
margin:EdgeInsets.only(top: 32),
child: LoginParentWidget()
,
)
],
),
)
],
),
);
}
}