Skip to content
pubscout

keyboard_safe

1.0.0, released a year ago by an unverified publisher

A Flutter widget that prevents keyboard overflow and auto-scrolls input fields.

WASM-ready
$ flutter pub add keyboard_safe
Source repository

What it does

Automatically adjusts layouts when the software keyboard appears, scrolls focused input fields into view, and supports sticky footers. It also includes optional tap-to-dismiss functionality and keyboard visibility callbacks.

AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Building forms or authentication screens that suffer from keyboard overflow.
  • Implementing chat interfaces where input fields need to stay visible above the keyboard.

Skip it when

  • You already manage view insets and custom scroll physics manually throughout your app.

Strengths

  • Prevents common keyboard overflow and layout shifting issues.
  • Provides automatic scrolling to focused text fields.
  • Includes helpful options like tap-to-dismiss and customizable animations.

Weaknesses

  • Adds another wrapper widget into the widget tree.
  • May require tuning parameters depending on complex nested scrolling structures.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Simply add the package to pubspec.yaml and wrap your body content with the KeyboardSafe widget.

KeyboardSafe(
  scroll: true,
  dismissOnTapOutside: true,
  footer: ElevatedButton(
    onPressed: _submitForm,
    child: const Text('Submit'),
  ),
  child: Column(
    children: [
      TextField(decoration: InputDecoration(labelText: 'Email')),
      SizedBox(height: 16),
      TextField(decoration: InputDecoration(labelText: 'Password')),
    ],
  ),
)

Alternatives

Packages that do the same job and could replace keyboard_safe.