flutter 软键盘挤压页面导致变形溢出

flutter  解决这种有两种办法 一种就是传统的嵌套 SingleChildScrollView 让页面可以上下滑动  如果不想改变页面结构 

flutter  类入口的 Scaffold 的resizeToAvoidBottomInset: false 就可以

注意:  一个页面不管嵌套了多少类 只要用了Scaffold   都需要设置 resizeToAvoidBottomInset: false

 @override
  Widget build(BuildContext context) {
    return Scaffold(
      resizeToAvoidBottomInset:false,
      appBar: CenterTitleAppBar(
        title: '会员',
        actions: <Widget>[
 
        ],
      ),
      body:MemberIndex(),
    );
  }
}

猜你喜欢

转载自www.cnblogs.com/tianmiaogongzuoshi/p/12202318.html