Foreword:
Solve the problem of the keyboard jacking up the page in flutter.
flutter 1 :
Scaffold.resizeToAvoidBottomPadding
return Scaffold(
resizeToAvoidBottomPadding: false, // 解决键盘顶起页面
flutter 2:
Scaffold.resizeToAvoidBottomInset
Official explanation:
bool resizeToAvoidBottomPadding
@ Is not recommended ( "Use resizeToAvoidBottomInset specify whether body size should be adjusted in the keyboard appears." "This feature is not recommended for use after v1.1.9."), The final version
This flag is not recommended, please use resizeToAvoidBottomInset instead .
Initially, the name was called MediaQueryData.padding . Now, it references MediaQueryData.viewInsets , so it should be clearer to the reader to use resizeToAvoidBottomInset .