Flutter 键盘弹出背景图片变形

键盘弹出导致背景

解决方法
resizeToAvoidBottomInset: false,

class LoginState extends State {

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Scaffold(
   // 添加这行解决
      resizeToAvoidBottomInset: false,
      body: Stack(
        children: [
          Image.asset("assets/images/login_bg.png",
            height: double.maxFinite,
            fit: BoxFit.fill,),
          Container(
            alignment: Alignment.topCenter,
            child: Column(
              children: [
                Image.asset("assets/images/login_title_icon.png",
                width: 119,
                height: 136,),
                Container(
                  margin:EdgeInsets.only(top: 32),
                  child: LoginParentWidget()
                  ,
                )
              ],
            ),
          )
        ],
      ),
    );
  }
}

你可能感兴趣的:(Flutter 键盘弹出背景图片变形)