zeba_academy_ai_ui_builder
A powerful Flutter package to build UI dynamically from JSON with support for dynamic forms, remote UI updates, theme switching, A/B testing, and widget plugins.
This package enables developers to change UI without updating the app, making it ideal for lowβcode platforms, admin dashboards, and remotely configurable apps.
β¨ Features
-
π§ Dynamic UI Builder Build Flutter widgets directly from JSON configuration.
-
π§© Dynamic Forms Generate forms dynamically with validation and state management.
-
π Remote UI Updates Update UI remotely without publishing a new app version.
-
π¨ Theme Switching Support for light/dark and custom themes dynamically.
-
π§ͺ A/B Testing Support Serve different UI versions to different users.
-
π Widget Plugin System Register custom widgets and use them in JSON layouts.
π¦ Installation
Add this to your pubspec.yaml:
dependencies:
zeba_academy_ai_ui_builder: ^1.0.0
Then run:
flutter pub get
π Basic Usage
Example JSON UI
{
"type": "column",
"children": [
{
"type": "text",
"data": "Welcome to Zeba Academy"
},
{
"type": "button",
"label": "Click Me"
}
]
}
Build UI from JSON
import 'package:flutter/material.dart';
import 'package:zeba_academy_ai_ui_builder/zeba_academy_ai_ui_builder.dart';
class ExamplePage extends StatelessWidget {
const ExamplePage({super.key});
@override
Widget build(BuildContext context) {
final jsonUI = {
"type": "text",
"data": "Hello Dynamic UI"
};
return Scaffold(
appBar: AppBar(title: const Text("Dynamic UI Example")),
body: DynamicUIBuilder.build(jsonUI),
);
}
}
π§© Dynamic Form Example
{
"type": "form",
"fields": [
{
"type": "text",
"label": "Name"
},
{
"type": "email",
"label": "Email"
}
]
}
π Register Custom Widget
You can extend the system by registering custom widgets.
DynamicWidgetRegistry.register(
"customCard",
(config) => Card(
child: Text(config["text"]),
),
);
Then use it in JSON:
{
"type": "customCard",
"text": "Hello Plugin Widget"
}
π§ͺ A/B Testing Example
Serve different UI layouts dynamically.
if (userGroup == "A") {
loadLayout("layout_a.json");
} else {
loadLayout("layout_b.json");
}
π Project Structure
lib/
ββ core/
β ββ dynamic_ui_builder.dart
β ββ widget_registry.dart
β
ββ widgets/
β ββ text_widget.dart
β ββ button_widget.dart
β
ββ forms/
β ββ dynamic_form.dart
β
ββ zeba_academy_ai_ui_builder.dart
π― Use Cases
This package is perfect for:
- Lowβcode Flutter apps
- Admin controlled UI systems
- Feature experiments
- Dynamic form builders
- Remote UI configuration
- Whiteβlabel applications
π Documentation
For full tutorials and guides:
π€ Contributing
Contributions are welcome.
- Fork the repository
- Create a new feature branch
- Commit your changes
- Submit a pull request
π License
This project is licensed under the GNU General Public License v3.0.
π¨βπ» 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
Or connect with me on LinkedIn
https://www.linkedin.com/in/sufyanism
π Zeba Academy β Your All-in-One No-Bloat Tech 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: https://code.zeba.academy β‘ Check out our YouTube tutorials: https://www.youtube.com/@zeba.academy β‘ Follow us on Instagram: https://www.instagram.com/zeba.academy/
Thank you for visiting.