flutter push page up when keyboard on

Viewed 30

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()
);

2 Answers

put your nextButtonWidget inside 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.

To scroll your button dynamically up,

Place your nextButtonWidget in bottomSheet.

bottomSheet: nextButtonWidget()
Related