Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

resizeToAvoidBottomPadding isn't defined

After I update my flutter with command flutter pub upgrade, this function isn't defined anymore, any solution for this..enter image description here

enter image description here

like image 832
ComaXD EA1 Avatar asked Feb 11 '21 15:02

ComaXD EA1


People also ask

When should we use a resizeToAvoidBottomInset?

Use resizeToAvoidBottomInset to specify if the body should resize when the keyboard appears.

How do you use resizeToAvoidBottomInset Flutter?

Steps to fix Flutter keyboard resize screen issueStep 1: Open the page where you have the TextField widget. Step 2: Locate the Scaffold widget. Step 3: Inside the Scaffold widget, add the resizeToAvoidBottomInset property and set its value to false . Step 4: Re-run the app.


1 Answers

Yes, actually, there is a comment inside of the API.

This flag is deprecated. Please use resizeToAvoidBottomInset instead.

So the idea would be to replace the behaviour as stated here.

resizeToAvoidBottomInset param definition:

If true the [body] and the scaffold's floating widgets should size themselves to avoid the onscreen keyboard whose height is defined by the ambient [MediaQuery]'s [MediaQueryData.viewInsets] bottom property. For example, if there is an onscreen keyboard displayed above the scaffold, the body can be resized to avoid overlapping the keyboard, which prevents widgets inside the body from being obscured by the keyboard.

like image 85
Max Weber Avatar answered Oct 23 '22 11:10

Max Weber