9
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Flutter]BOTTOM OVERFLOWED BY ** PIXELSへの対処法

Posted at

問題

Flutterでキーボードを出したときに、BOTTOM OVERFLOWED BY N PIXELS と警告が出ることがある。
image.png

解決策

Scaffoldに resizeToAvoidBottomPadding:false を記載する。


Scaffold(
 resizeToAvoidBottomPadding: false,
 body: ...)

resizeToAvoidBottomPaddingはデフォルトはtrueになっており、キーボードを出したときに画面の要素を隠さないようにリサイズしてくれるのだが、隠しきれなかったときにこのような警告が出る。
falseにすることで、要素は固定したままキーボードを重ねて表示する。

参考

https://stackoverflow.com/questions/51972371/bottom-overflow-by-30px
https://api.flutter.dev/flutter/material/Scaffold/resizeToAvoidBottomInset.html

9
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?