smart_keyboard_insets
0.3.1, released 5 weeks ago by an unverified publisher
Accurate keyboard height and safe-area insets for Flutter native on Android and iOS.
WASM-ready
What it does
Provides accurate keyboard height and safe-area bottom inset detection, natively on Android and iOS with fallbacks on web and desktop. Includes helper widgets like AnimatedKeyboardPadding and Stream/ValueNotifier APIs to size emoji panels and keep chat composers above the keyboard.
AI-written summary of version 0.3.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- Building chat applications where composers and sticker panels need to match the keyboard height perfectly.
- You need keyboard height before the open animation completely finishes.
Skip it when
- Your app only needs basic form layouts where standard MediaQuery.viewInsets is already sufficient.
Strengths
- Provides keyboard height as soon as the keyboard starts to appear rather than after it settles.
- Includes ready-made layout widgets like KeyboardPadding and AnimatedKeyboardPadding.
- Offers multiple API styles including Streams, ValueNotifiers, and one-time queries.
Weaknesses
- Requires disabling default Scaffold resize behavior in certain layouts.
- Native implementations are platform-specific to Android and iOS.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Add the dependency to pubspec.yaml and optionally set resizeToAvoidBottomInset: false on Scaffold when using padding widgets.
Scaffold(
resizeToAvoidBottomInset: false,
body: Column(
children: [
Expanded(child: MessageList()),
AnimatedKeyboardPadding(
child: ComposerWidget(),
),
],
),
)