Flutter 键盘弹出背景图片变形

键盘弹出导致背景

解决方法
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",
                 119,
                height: 136,),
                Container(
                  margin:EdgeInsets.only(top: 32),
                  child: LoginParentWidget()
                  ,
                )
              ],
            ),
          )
        ],
      ),
    );
  }
}
原文地址:https://www.cnblogs.com/Im-Victor/p/12643147.html