auto_hide_keyboard
1.1.1, released a year ago by xbox.work
Automatically hides the soft keyboard when tapping outside text fields or scrolling.
What it does
AutoHideKeyboard is a Flutter widget wrapper that automatically dismisses the soft keyboard when a user taps outside of text input fields or scrolls the page. It utilizes global pointer and visibility detection to manage focus states effortlessly.
AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to automatically dismiss the keyboard when users tap outside text fields
- You want to dismiss the keyboard when the page is scrolled
Skip it when
- You need a complex form state management framework rather than just keyboard dismissal
- You prefer handling keyboard dismissal manually via GestureDetector at the scaffold level
Strengths
- Smart detection for taps outside TextField widgets
- Supports multiple input fields on the same screen
- Zero configuration required for basic usage
Weaknesses
- Requires wrapping individual text fields or containers
- Limited customization beyond safe padding
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
AutoHideKeyboard(
child: TextField(
decoration: InputDecoration(
hintText: 'Enter your text here',
),
),
)Alternatives
Packages that do the same job and could replace auto_hide_keyboard.
- keyboard_dismisser
A Flutter widget to hide the keyboard when performing gestures outside of it.
50Compare - marquee_widget
A Flutter widget that scrolls text and other widgets with RTL support.
47Compare - re_editor
A lightweight text and code editor widget for Flutter with syntax highlighting and folding.
80Compare - infinite_scroll_pagination
Lazily load and display pages of items as the user scrolls down your screen.
72Compare
Works with
Packages commonly used together with auto_hide_keyboard: ones it builds on, ones built on it, and its own family.