keyboard_insets
0.1.2, released a year ago by 2gis.ru
Provides real‑time keyboard height and visibility streams for Flutter apps.
What it does
The plugin emits per‑frame keyboard inset values and a state stream indicating visibility and animation status. It also offers a SafeArea widget that keeps bottom padding stable during keyboard animations.
AI-written summary of version 0.1.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need precise keyboard height for custom UI adjustments
- You want to react to keyboard visibility without using MediaQuery
- You need a stable bottom safe‑area while the keyboard animates
Skip it when
- You only need occasional keyboard height (MediaQuery is sufficient)
- You target platforms without keyboard support (e.g., desktop)
Strengths
- High‑frequency per‑frame updates
- Cross‑platform (iOS, Android, Web)
- Lightweight FFI implementation
- Provides a SafeArea replacement
Weaknesses
- Desktop returns zero insets (no keyboard support)
- Requires iOS deployment target ≥13.0
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Add dependency, ensure iOS Podfile sets platform to '13.0' or higher; no additional permissions required.
import 'package:keyboard_insets/keyboard_insets.dart';
void main() {
KeyboardInsets.insets.listen((height) {
print('Keyboard height: $height');
});
KeyboardInsets.stateStream.listen((state) {
print('Visible: ${state.isVisible}, Animating: ${state.isAnimating}');
});
}Alternatives
Packages that do the same job and could replace keyboard_insets.
- keyboard_visibility_pro
Detects soft-keyboard open and close status in Flutter applications.
39Compare - flutter_keyboard_visibility_temp_fork
Detects whether the on-screen keyboard is visible on Android and iOS.
78Compare - keyboard_service
Keyboard visibility tracking and automatic dismissal without native plugins
59Compare - flutter_smooth_markdown
High-performance markdown renderer and editor with syntax highlighting, LaTeX, tables, SVG, Mermaid, and real-time streaming.
61Compare
Works with
Packages commonly used together with keyboard_insets: ones it builds on, ones built on it, and its own family.