Sitemap
Go With Flutter

Flutter Tips & Tricks.

30 Flutter Tips| FT26: Move Widget Up When Keyboard Appears In Flutter

2 min readDec 8, 2022

--

Flutter Tips 26 of #30FlutterTips with LakshydeepVikram series which had explored about how to move the widget up when screen keyboard appears in Flutter.
You can search for ##30FlutterTips for more. If you like this series, please don’t forget to share with ##30FlutterTips tag.

Press enter or click to view image in full size

FT26: Move Widget Up When Keyboard Appears In Flutter

All you had definitely faced the issue of not moving the widget up automatically in flutter when the screen keyboard appears. This situation arises when you have to fill the form or while you are using TextField in Flutter.
Without any delay, let’s move to the solution part.

Mainly you need to use only one thing in a couple of ways.

MediaQuery.of(context).viewInsets.bottom
// This will help you manage the space taken by the screen keyboard.

We can use this like:

Inside TextFormField:

TextFormField(
scrollPadding: EdgeInsets.only(
bottom…

--

--

Lakshydeep Vikram
Lakshydeep Vikram

Written by Lakshydeep Vikram⁠

Software Developer | Google Dev Library Author | Flutter Enthusiast