Skip to content
pubscout

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.

WASM-ready
$ flutter pub add auto_hide_keyboard
Source repository

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.

Works with

Packages commonly used together with auto_hide_keyboard: ones it builds on, ones built on it, and its own family.