keyboard_avoider
0.2.0, released 3 years ago by martinrybak.com
A lightweight alternative to Scaffold for avoiding the on-screen software keyboard.
What it does
Automatically adjusts its padding to avoid the on-screen keyboard and can scroll obscured TextField child widgets into view on focus. It can be applied selectively to specific widgets rather than requiring a full-screen Scaffold.
AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to avoid the on-screen software keyboard without using a full-screen Scaffold
- You need to automatically scroll focused TextFields into view
- You want to inset padding only by the actual amount obscured by the keyboard
Skip it when
- You are already satisfied with the default behavior of Flutter's built-in Scaffold resize properties
- You need sophisticated layout engines not covered by standard single-child scroll views
Strengths
- Lightweight alternative to Scaffold
- Selectively applied to specific areas rather than the whole screen
- Supports auto-scrolling focused child widgets into view
Weaknesses
- Limited configuration options documented beyond basic properties like autoScroll
- Relies on standard ScrollView wrapping when autoScroll is enabled
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:keyboard_avoider/keyboard_avoider.dart';
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return KeyboardAvoider(
child: Placeholder(),
);
}
}Alternatives
Packages that do the same job and could replace keyboard_avoider.
- carousel_slider
Carousel slider widget with infinite scroll, auto play, and custom child support
73Compare - carousel_slider_plus
A customizable carousel slider widget with infinite scroll and autoplay support.
72Compare - scroll_to_index
Scroll to a specific child of any scrollable widget in Flutter.
50Compare - scroll_loop_auto_scroll
Widget that auto‑scrolls its child infinitely in a loop
50Compare