When I use a textfield on the page I designed with expanded, everything gets shrink when the keyboard is opened. How can i disable this.

2

There are 2 best solutions below

0
On BEST ANSWER

If you would like not to scroll the page, set Scaffold's resizeToAvoidBottomInset property to false. It will avoid any effect that pops up from the keyboard. But it comes with a caveat If your TextField is placed within the height of keyboard, whatever user types will not be able to see. Try this if it works for you.

0
On

you can use singlechildscrollview or listview widget. They will make it scroll. and you can use MediaQuery.of(context).viewInsets.bottom for padding or margin. Get keyboard height in Flutter.