avoid_keyboard
0.3.0, released 5 years ago by an unverified publisher
A widget that scrolls specific input controls out of the way when the keyboard appears.
What it does
The avoid_keyboard package includes an AvoidKeyboard widget to wrap text fields and input controls. It shifts contents only if the keyboard actually overlaps the focused input control, without compressing the entire viewport.
AI-written summary of version 0.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want specific view regions to avoid the keyboard instead of compressing the entire view
- You have fixed height columns where default Scaffold resizing fails
- You need input controls to scroll into view when traversed via keyboard focus events
Skip it when
- You prefer the default Scaffold resizing behavior for the entire viewport
Strengths
- Only shifts contents when the keyboard overlaps the focused input control
- Allows avoiding keyboard for specific view regions rather than the whole screen
- Responds to focus traversal events while the keyboard is up
Weaknesses
- Limited documentation regarding advanced configuration options
- Depends on the specific layout structures supported by the widget
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
class AvoidKeyboardExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AvoidKeyboard(
child: Column(
children: [
TextField(),
TextField(),
],
),
);
}
}Alternatives
Packages that do the same job and could replace avoid_keyboard.
- keyboard_service
Keyboard visibility tracking and automatic dismissal without native plugins
59Compare - keyboard_visibility_pro
Detects soft-keyboard open and close status in Flutter applications.
39Compare - keyboard_detection
Detect keyboard visibility using bottom view inset in Flutter
56Compare - reorderable_grid_view
A reorderable grid view widget for Flutter supporting drag-and-drop reordering.
50Compare
Works with
Packages commonly used together with avoid_keyboard: ones it builds on, ones built on it, and its own family.