0
0

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 1 year has passed since last update.

【Flutter】キーボードが現れるまたは、消えるときにウィジットの再構築が走る

Posted at

無駄に再構築される

TextFieldをタップしてキーボードが表示されるだけなのに、なぜか再構築が走る。しかも、それがかなりツリーの上の方なので、パフォーマンスにかなりダメージを与えてくれる。その原因追及に苦労したので、備忘録として残しておく。

自分の場合の解決策

resizeToAvoidBottomInsetはfalseにしたのに、再構築が走った。
調べてみると、MediaQueryを使うと、再構築が走るらしい。
英語記事だが、下の記事が参考になった。
https://stackoverflow.com/questions/68244573/why-does-my-widget-rebuild-when-i-use-keyboard

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?