Menu

1 / 3

The keyboard that vanished when the Flutter chat input expanded

DEV Community: flutter·Frank Milvus·2 days ago
#CCe60ZOV
#devtoflutter#devto#dev#keyboard#composer
Long article (1664 words) — no AI summary yet.
Reading 0:00
15s threshold

You tap the expand button in a chat composer. The input flashes, grows to a few lines, and then the keyboard disappears. The screen is now a large, mostly empty editor, and the thing you were typing with is gone. On top of that, opening the keyboard in the first place feels heavier than it should — not broken, just a beat behind your thumb.

Both symptoms live in the same widget, but they have different causes. One is a widget-tree identity mistake. The other is a rebuild subscription that quietly turned the keyboard animation into a full-screen rebuild. This post walks through both, the fixes, and the two invariants that make a composer feel solid.

Symptom one: the keyboard drops on expand

The composer had two layouts:

Collapsed: a floating card with a frosted background, side margins and rounded corners.

Expanded: a full-height editor that should reach from the header to the keyboard.

That sounds like a simple conditional.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.