my problem is exactly this; When the application I wrote with flutter works with the emulator, the body resizes when the keyboard is opened, but when I connect a real phone and try it, the keyboard hides the text fields.
Need to set a permission?
my problem is exactly this; When the application I wrote with flutter works with the emulator, the body resizes when the keyboard is opened, but when I connect a real phone and try it, the keyboard hides the text fields.
Need to set a permission?
I got the similar problem inside scrollable widget, the solution is to wrap your widget with Padding
like that:
@override
Widget build(BuildContext context) {
final bottom = MediaQuery.of(context).viewInsets.bottom;
return SingleChildScrollView(
controller: widget.controller,
child: Padding(
padding: EdgeInsets.only(bottom: bottom),
child: YourWidgetWithTextFields()
);
}
You can set resizeToAvoidBottomInset
to false
in your Scaffold()
Like this:
return Scaffold(
resizeToAvoidBottomInset: false,
body: // ...
// ...
)
Documentation reference: Scaffold - resizeToAvoidBottomInset