Zeba Academy Theme Builder ๐ŸŽจ

A powerful and flexible Flutter theme building package for creating beautiful, scalable, and consistent application themes.

zeba_academy_theme_builder helps developers build professional UI systems with reusable design foundations.

โœจ Features

๐ŸŽจ Color Builder

Create and manage application colors easily.

Supported:

  • Primary color
  • Secondary color
  • Background color
  • Surface color
  • Error color
  • Color export support

Example:

final colors = ThemeColors(
  primary: Colors.blue,
  secondary: Colors.orange,
  background: Colors.white,
  surface: Colors.grey.shade100,
  error: Colors.red,
);

โœ Typography Setup

Create reusable typography configurations.

Example:

final typography = TypographyConfig(
  fontFamily: "Roboto",
  titleSize: 24,
  bodySize: 16,
  captionSize: 12,
);

๐ŸŒž Light Theme

Generate a complete light theme.

final builder = ZebaThemeBuilder(
  colors: ThemeColors.defaults(),
  typography: const TypographyConfig(),
  tokens: const DesignTokens(),
);

ThemeData theme = builder.light();

๐ŸŒ™ Dark Theme

Create a production-ready dark mode.

ThemeData darkTheme = builder.dark();

Supports:

  • Dark surfaces
  • Dark cards
  • Dark buttons
  • Dark inputs
  • Material 3 styling

๐Ÿงฉ Component Preview

Preview UI components with generated themes.

ComponentPreview(
  theme: builder.light(),
)

Includes preview support for:

  • Buttons
  • Cards
  • Typography
  • UI components

๐Ÿ”‘ Design Tokens

Maintain consistent UI values.

Example:

final tokens = DesignTokens(
  spacing: 8,
  radius: 12,
  elevation: 2,
);

Controls:

  • Spacing system
  • Border radius
  • Elevation

๐Ÿ“ฆ Theme Export

Export theme configuration.

final data = ThemeExporter.export(
  colors: ThemeColors.defaults(),
  tokens: const DesignTokens(),
);

Example output:

{
  "colors": {
    "primary": "ff2196f3",
    "secondary": "ffff9800"
  },
  "tokens": {
    "spacing": 8,
    "radius": 12,
    "elevation": 2
  }
}

๐Ÿš€ Installation

Add dependency:

dependencies:
  zeba_academy_theme_builder: ^1.0.0

Run:

flutter pub get

๐Ÿ“– Usage

Import:

import 'package:zeba_academy_theme_builder/zeba_academy_theme_builder.dart';

Create theme:

final zebaTheme = ZebaThemeBuilder(

  colors: ThemeColors.defaults(),

  typography: const TypographyConfig(),

  tokens: const DesignTokens(),

);


MaterialApp(

  theme: zebaTheme.light(),

  darkTheme: zebaTheme.dark(),

  themeMode: ThemeMode.system,

);

๐Ÿ— Package Structure

lib/

โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ theme_colors.dart
โ”‚   โ”œโ”€โ”€ typography.dart
โ”‚   โ””โ”€โ”€ design_tokens.dart
โ”‚
โ”œโ”€โ”€ builder/
โ”‚   โ””โ”€โ”€ theme_builder.dart
โ”‚
โ”œโ”€โ”€ themes/
โ”‚   โ”œโ”€โ”€ light_theme.dart
โ”‚   โ””โ”€โ”€ dark_theme.dart
โ”‚
โ”œโ”€โ”€ widgets/
โ”‚   โ””โ”€โ”€ component_preview.dart
โ”‚
โ””โ”€โ”€ zeba_academy_theme_builder.dart

โœ… Requirements

  • Flutter >= 3.18
  • Dart >= 3.0

๐Ÿงช Testing

Run tests:

flutter test

Analyze package:

flutter analyze

๐Ÿค Contributing

Contributions are welcome.

Steps:

git checkout -b feature/new-feature

git commit -m "Add new feature"

git push origin feature/new-feature

Create a Pull Request.


๐Ÿ‘จโ€๐Ÿ’ป About Me

โœจ Iโ€™m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.

Website:

https://sufyanism.com/

LinkedIn:

https://www.linkedin.com/in/sufyanism


๐Ÿš€ Zeba Academy

Your all-in-one learning hub!

Explore courses and resources in:

  • Coding
  • Technology
  • Development
  • Real-world projects

Main Website:

https://zeba.academy

Developer Resources:

https://code.zeba.academy

YouTube:

https://www.youtube.com/@zeba.academy

Instagram:

https://www.instagram.com/zeba.academy/


๐Ÿ“„ License

This project is licensed under the GNU General Public License v3.0.

You are free to:

  • Use
  • Modify
  • Share
  • Distribute

under the GPL-3.0 license terms.

See LICENSE file for details.


Made with โค๏ธ by Sufyan bin Uzayr

Powered by Zeba Academy ๐Ÿš€