Flutter clicks the input box to pop up the keyboard, causing the bottom pixel overflow problem

1. Description of requirements

The page contains an input box and a list, and users can search the list through the search box.

2. The cause of the bug

When I draw the page, there is no problem, but when I click the search box, a keyboard pops up, causing the bottom pixel overflow problem.

3. Bug solution

(1) Option 1:

Add resizeToAvoidBottomPadding: false in Scaffold, this property can make part of the content disappear when the keyboard pops up, so as not to cause pixel overflow.

(2) Option 2:

Nest a SingleChildScrollView in bogy, so that the content can scroll in the remaining area when the keyboard pops up, so that it will not cause pixel overflow.

Guess you like

Origin blog.csdn.net/m0_68349563/article/details/129387916