简体   繁体   English

flutter 键盘打开时向上推页

[英]flutter push page up when keyboard on

i want to push the page up when keyboard is on.我想在键盘打开时向上推页面。 i have next page button bottom of my page (for now its bottomnavigationbar) but when i filling fields and keyboard is on next page button stays under keyboard, i want to keyboard pushes up the bottomnavigationbar and always seen我的页面底部有下一页按钮(现在它的底部导航栏)但是当我填写字段并且键盘在下一页按钮停留在键盘下方时,我想键盘向上推底部导航栏并总是看到

Scaffold(
body : Center(
      child: SingleChildScrollView(
        child: Column(
          children: [
           ..mywidgets
          ],
        ),
      ),
    ),
bottomNavigationBar: nextButtonWidget()
);

put your nextButtonWidget inside Column.将您的 nextButtonWidget 放在 Column 中。 Not as bottomNavigationBar.不像底部导航栏。

Placing widgets inside BottomNavigationBar will show your widgets at the bottom of the screen regardless of whether screen is scrolled or not.无论屏幕是否滚动,将小部件放置在 BottomNavigationBar 中都会在屏幕底部显示您的小部件。

To scroll your button dynamically up,要动态向上滚动按钮,

Place your nextButtonWidget in bottomSheet.将 nextButtonWidget 放在底部表中。

bottomSheet: nextButtonWidget()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM