zeba_academy_component_lab 0.0.1 copy "zeba_academy_component_lab: ^0.0.1" to clipboard
zeba_academy_component_lab: ^0.0.1 copied to clipboard

A Flutter Storybook-style component playground for building, previewing, and documenting UI components in real time.

๐Ÿงฉ Zeba Academy Component Lab ๐Ÿ“„ Canvas Document (Production README) ๐ŸŽฏ 1. Product Overview

Zeba Academy Component Lab is a Flutter-based interactive UI component playground designed to build, preview, edit, and document widgets in real time.

It acts like a lightweight Flutter Storybook + design system sandbox, enabling developers to visually experiment with UI components and instantly see code output.

๐Ÿš€ 2. Core Objective

This package is built to solve:

โŒ Lack of real-time widget preview tools in Flutter projects โŒ Hard-to-maintain UI documentation โŒ Manual UI testing without visual feedback โŒ No unified component exploration system โœ” Solution Provided

A single environment that combines:

Component browsing Live rendering Property editing Code generation Documentation viewing โœจ 3. Key Features ๐Ÿงฉ Component Gallery Displays all registered UI components Organized and extendable registry system Quick selection interface ๐Ÿ‘€ Live Preview Engine Real-time widget rendering Instant UI updates on property changes Stateless + stateful component support ๐ŸŽ› Property Editor Panel Dynamic UI controls for widget customization Supports: String inputs Boolean toggles Extensible property types (future-ready) ๐Ÿ’ป Code Preview Panel Auto-generates Dart code from live state Helps developers learn and copy implementations Reflects real-time UI configuration ๐Ÿ“– Documentation Panel Displays component metadata Description and usage information Inline developer guidance ๐Ÿ— 4. System Architecture ComponentLab (Main Shell) โ”‚ โ”œโ”€โ”€ WidgetGallery โ”‚ โ””โ”€โ”€ Component selection UI โ”‚ โ”œโ”€โ”€ LivePreview โ”‚ โ””โ”€โ”€ Real-time widget renderer โ”‚ โ”œโ”€โ”€ PropertyPanel โ”‚ โ””โ”€โ”€ Dynamic input controls โ”‚ โ”œโ”€โ”€ CodeView โ”‚ โ””โ”€โ”€ Generated Dart code output โ”‚ โ””โ”€โ”€ DocView โ””โ”€โ”€ Component documentation display ๐Ÿงฑ 5. Core Design System ๐Ÿ“ฆ Component Model

Each UI component is defined using:

ID Name Description Properties Builder function Code snippet ComponentModel( id, name, description, properties, builder, codeSnippet ) ๐ŸŽ› Property Model

Defines editable UI properties:

key label type default value PropertyModel( key, label, type, defaultValue ) โš™ Registry System

Central registry holds all components:

ComponentRegistry.components

Used for:

Listing UI components Feeding gallery UI Driving preview engine ๐Ÿ’ป Code Generation Engine

Converts UI state into Dart code:

Widget + Props โ†’ Dart Code String

Purpose:

Developer learning Copy-ready output Debugging UI structure ๐Ÿ“ฆ 6. Installation Add dependency dependencies: zeba_academy_component_lab: ^0.0.1 ๐Ÿงช 7. Usage Basic Setup import 'package:flutter/material.dart'; import 'package:zeba_academy_component_lab/zeba_academy_component_lab.dart';

void main() { runApp(const MaterialApp( debugShowCheckedModeBanner: false, home: ComponentLab(), )); } ๐Ÿงฉ 8. Adding Custom Components

Developers can extend the system by registering new components:

ComponentModel( id: "custom_button", name: "Custom Button", description: "Reusable styled button component", properties: [ PropertyModel( key: "text", label: "Button Text", type: PropertyType.string, defaultValue: "Click Me", ), ], builder: (props) { return ElevatedButton( onPressed: () {}, child: Text(props["text"]), ); }, codeSnippet: ''' ElevatedButton( onPressed: () {}, child: Text("Click Me"), ) ''', ); ๐Ÿ“ 9. Project Structure lib/ โ”œโ”€โ”€ zeba_academy_component_lab.dart โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ core/ โ”‚ โ”‚ โ”œโ”€โ”€ component_model.dart โ”‚ โ”‚ โ”œโ”€โ”€ property_model.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ engine/ โ”‚ โ”‚ โ”œโ”€โ”€ component_registry.dart โ”‚ โ”‚ โ”œโ”€โ”€ code_generator.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ui/ โ”‚ โ”‚ โ”œโ”€โ”€ component_lab.dart โ”‚ โ”‚ โ”œโ”€โ”€ widget_gallery.dart โ”‚ โ”‚ โ”œโ”€โ”€ live_preview.dart โ”‚ โ”‚ โ”œโ”€โ”€ property_panel.dart โ”‚ โ”‚ โ”œโ”€โ”€ code_view.dart โ”‚ โ”‚ โ”œโ”€โ”€ doc_view.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ utils/ ๐Ÿ“Œ 10. System Modules Core Layer ComponentModel PropertyModel Engine Layer ComponentRegistry CodeGenerator UI Layer ComponentLab (main shell) WidgetGallery LivePreview PropertyPanel CodeView DocView ๐Ÿ“ˆ 11. Roadmap Phase 1 (Current) โœ” Component registry system โœ” Live preview engine โœ” Property editor โœ” Code generator Phase 2 (Enhancements) ๐Ÿ”ฅ Drag & drop UI builder ๐Ÿ”ฅ JSON-based component schema ๐Ÿ”ฅ Save/load workspace state ๐Ÿ”ฅ Theme switching (Material 3 / Dark mode) Phase 3 (Advanced) ๐Ÿง  AI component generator ๐Ÿ”Œ Plugin system support ๐Ÿ“ค Export full Flutter screens โ˜ Cloud sync for components ๐Ÿ‘จโ€๐Ÿ’ป 12. About Developer

Sufyan bin Uzayr Open-source developer focused on scalable Flutter ecosystems.

๐ŸŒ https://sufyanism.com ๐Ÿ’ผ https://www.linkedin.com/in/sufyanism ๐ŸŽ“ 13. Zeba Academy Ecosystem

A platform for learning modern development:

๐ŸŒ https://zeba.academy ๐Ÿ“š https://code.zeba.academy โ–ถ https://www.youtube.com/@zeba.academy ๐Ÿ“ธ https://www.instagram.com/zeba.academy ๐Ÿ“œ 14. License

This project is licensed under:

GNU General Public License v3.0 (GPL-3.0)

You are free to:

Use Modify Distribute

Under the same license terms.

๐Ÿ”— https://www.gnu.org/licenses/gpl-3.0.html

โญ 15. Contribution

We welcome contributions:

โญ Star the repository ๐Ÿด Fork the project ๐Ÿงฉ Add new components ๐Ÿ”ง Improve engine modules ๐Ÿ“ฉ Submit pull requests ๐Ÿงฉ End of Canvas Document

0
likes
140
points
68
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

A Flutter Storybook-style component playground for building, previewing, and documenting UI components in real time.

Homepage

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on zeba_academy_component_lab