zeba_academy_focus_manager_plus 0.0.1
zeba_academy_focus_manager_plus: ^0.0.1 copied to clipboard
Advanced focus management for Flutter with keyboard navigation, focus history, auto switching, and accessibility enhancements.
zeba_academy_focus_manager_plus #
๐ Advanced Focus Management for Flutter
A powerful, lightweight, and extensible Flutter package for handling advanced focus control, keyboard navigation, accessibility, and focus history โ all in one place.
โจ Features #
- ๐น Advanced Focus Control
- โจ๏ธ Keyboard Navigation (Tab, Arrow Keys, Shift+Tab)
- ๐ Focus History Tracking
- ๐ Auto Focus Switching
- โฟ Accessibility Enhancements
- ๐งฉ Lightweight & Modular Architecture
๐ฆ Installation #
Add this to your pubspec.yaml:
dependencies:
zeba_academy_focus_manager_plus: ^0.0.1
Then run:
flutter pub get
๐ Quick Start #
import 'package:flutter/material.dart';
import 'package:zeba_academy_focus_manager_plus/zeba_academy_focus_manager_plus.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
final controller = ZebaFocusController();
final node1 = FocusNode();
final node2 = FocusNode();
final node3 = FocusNode();
controller.register(node1);
controller.register(node2);
controller.register(node3);
return MaterialApp(
home: Scaffold(
body: KeyboardNavigation(
controller: controller,
child: Column(
children: [
TextField(focusNode: node1),
TextField(focusNode: node2),
TextField(focusNode: node3),
ElevatedButton(
onPressed: controller.focusLastVisited,
child: const Text("Go to Last Focus"),
)
],
),
),
),
);
}
}
๐ง Core Concepts #
๐น ZebaFocusController #
Handles focus registration and navigation.
๐น FocusHistory #
Tracks previously focused elements.
๐น KeyboardNavigation #
Adds keyboard-based navigation support.
๐น FocusScopePlus #
Provides controller access across widget tree.
๐น AccessibleFocus #
Improves accessibility using semantics.
โจ๏ธ Keyboard Support #
| Key | Action |
|---|---|
| Tab | Next Focus |
| Shift + Tab | Previous Focus |
| Arrow Down | Next Focus |
| Arrow Up | Previous Focus |
โฟ Accessibility #
Improve screen reader support using:
AccessibleFocus(
label: 'Submit Button',
child: ElevatedButton(
onPressed: () {},
child: Text('Submit'),
),
)
๐งช Testing #
Run tests using:
flutter test
Check code quality:
flutter analyze
๐ Project Structure #
lib/
โโโ zeba_academy_focus_manager_plus.dart
โโโ src/
โโโ focus_controller.dart
โโโ focus_history.dart
โโโ focus_scope_plus.dart
โโโ keyboard_navigation.dart
โโโ focus_accessibility.dart
๐ฃ๏ธ Roadmap #
- ๐ฒ Focus Groups (Grid Navigation)
- ๐ฒ Custom Shortcuts (WASD / Gamepad)
- ๐ฒ Focus Animations
- ๐ฒ Scroll-to-Focus Integration
- ๐ฒ Form Validation Autofocus
๐ค Contributing #
Contributions are welcome!
- Fork the repo
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
๐ License (GPL v3) #
This project is licensed under the GNU General Public License v3.0.
You are free to:
- Use
- Modify
- Distribute
Under the condition that all derivative works are also open source under GPL.
๐จโ๐ป About Me #
โจ Iโm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at https://sufyanism.com/ or connect with me on Linkedin https://www.linkedin.com/in/sufyanism
๐ Your all-in-one no-bloat hub! #
๐ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! ๐ปโจ
Zeba Academy is a learning platform dedicated to coding, technology, and development. โก Visit our main site: https://zeba.academy โก Explore hands-on courses and resources at: https://code.zeba.academy โก Check out our YouTube for more tutorials: https://www.youtube.com/@zeba.academy โก Follow us on Instagram: https://www.instagram.com/zeba.academy/
โญ Support #
If you like this project, please give it a โญ on GitHub and share it with others!
Thank you for visiting! ๐