======================================================== ๐ฆ ZEBA ACADEMY KEYBOARD
A lightweight Flutter package for handling keyboard events, animations, height detection, and UI utilities.
======================================================== ๐ FEATURES
โ Keyboard open / close listener โ Real-time keyboard height detection โ Smooth keyboard animation support โ Tap-to-dismiss keyboard helper โ Keyboard-aware builder widget โ Fully reactive & lightweight โ No external dependencies โ Flutter 3+ compatible
======================================================== ๐ฅ INSTALLATION
Add dependency in pubspec.yaml:
dependencies: zeba_academy_keyboard: ^1.0.0
Then run:
flutter pub get
======================================================== ๐ง CORE CONCEPT
This package is built around a central controller:
KeyboardController โ State Management (open / close / height) โ Reactive Widgets (Builder / Listener / Animation) โ Utility Helpers
======================================================== ๐ BASIC USAGE
- DISMISS KEYBOARD
KeyboardDismiss( child: Scaffold( body: TextField(), ), );
- KEYBOARD ANIMATED PADDING
KeyboardAnimatedPadding( child: YourWidget(), );
- KEYBOARD HEIGHT LISTENER
KeyboardHeight( builder: (context, height) { return Text("Height: $height"); }, );
- KEYBOARD AWARE BUILDER
KeyboardAwareBuilder( builder: (context, visible, height) { return Column( children: Text(visible ? "Keyboard Open" : "Keyboard Closed"), Text("Height: $height"), , ); }, );
- KEYBOARD OPEN/CLOSE LISTENER
KeyboardListener( onOpened: () { print("Keyboard Opened"); }, onClosed: () { print("Keyboard Closed"); }, child: YourWidget(), );
======================================================== ๐งฐ UTILITY METHODS
KeyboardUtils.dismiss(context);
bool visible = KeyboardUtils.isVisible(context);
double height = KeyboardUtils.height(context);
======================================================== ๐ฑ EXAMPLE APP
import 'package:flutter/material.dart'; import 'package:zeba_academy_keyboard/zeba_academy_keyboard.dart';
void main() { runApp(const MyApp()); }
class MyApp extends StatelessWidget { const MyApp({super.key});
@override Widget build(BuildContext context) { return MaterialApp( home: KeyboardDismiss( child: Scaffold( appBar: AppBar(title: Text("Keyboard Demo")), body: KeyboardAnimatedPadding( child: Padding( padding: EdgeInsets.all(16), child: Column( children: [ TextField(), SizedBox(height: 20),
KeyboardAwareBuilder(
builder: (context, visible, height) {
return Text(
visible
? "Keyboard Open: $height"
: "Keyboard Closed",
);
},
),
],
),
),
),
),
),
);
} }
======================================================== โก WHY THIS PACKAGE?
Flutter does NOT provide:
โ Simple keyboard state listener โ Easy keyboard height access โ Built-in keyboard animation helpers โ Reusable keyboard-aware widgets
This package solves all of these in a clean architecture.
======================================================== ๐ REQUIREMENTS
โข Flutter 3.0+ โข Dart 3.0+
======================================================== ๐งช TESTING
Run tests:
flutter test
======================================================== ๐ LICENSE
GNU GENERAL PUBLIC LICENSE v3 (GPL-3.0)
Copyright (C) 2026 Zeba Academy
This program is free software: you can redistribute it and/or modify it under GPL v3.
NO WARRANTY is provided.
https://www.gnu.org/licenses/gpl-3.0.html
======================================================== ๐จโ๐ป ABOUT ME
Sufyan bin Uzayr Open-source developer
Website: https://sufyanism.com LinkedIn: https://www.linkedin.com/in/sufyanism
======================================================== ๐ ZEBA ACADEMY
https://zeba.academy https://code.zeba.academy https://www.youtube.com/@zeba.academy https://www.instagram.com/zeba.academy/