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.
CodePudding user response:
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.
CodePudding user response:
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.