zeba_academy_modular_widget_system
Overview
zeba_academy_modular_widget_system is a production-ready Flutter package for building modular and reusable widget systems. Easily create pluggable widget modules that can be loaded, unloaded, and reused across different features of your Flutter app.
Features
- ✅ Pluggable widget modules
- ✅ Load/unload widgets locally
- ✅ Feature-based structure
- ✅ Reusable modules
- ✅ App composition for scalable apps
- ✅ Dependency management for modules
- ✅ Context-based shared data
- ✅ Fully tested and production-ready
Installation
Add the package to your pubspec.yaml:
dependencies:
zeba_academy_modular_widget_system:
path: ../zeba_academy_modular_widget_system
Then run:
flutter pub get
Quick Start
1. Create a Module
import 'package:flutter/widgets.dart';
import 'package:zeba_academy_modular_widget_system/zeba_academy_modular_widget_system.dart';
class HelloModule extends ZebaModule {
@override
String get name => 'hello_module';
@override
void onLoad(ModuleContext context) {
super.onLoad(context);
debugPrint('HelloModule loaded');
}
@override
Widget build(BuildContext context) {
return const Center(child: Text('Hello from Module'));
}
}
2. Load Module
final loader = ModuleLoader();
loader.load(HelloModule());
3. Use in UI
ModularBuilder(moduleName: 'hello_module');
4. Unload Module Dynamically
loader.unload('hello_module');
Folder Structure Suggestion
lib/
├── zeba_academy_modular_widget_system.dart
└── src/
├── core/
│ ├── module.dart
│ ├── module_registry.dart
│ └── module_loader.dart
├── widgets/
│ └── modular_builder.dart
└── utils/
└── module_context.dart
Testing
A full test suite is included:
flutter test
All tests pass and cover module loading, unloading, and registry checks.
License
This package is licensed under GPL v3 License.
See LICENSE file for details.
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 sufyanism.com or connect with me on Linkedin
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: zeba.academy ➡ Explore hands-on courses and resources at: code.zeba.academy ➡ Check out our YouTube for more tutorials: zeba.academy ➡ Follow us on Instagram: zeba.academy
Thank you for visiting!