zeba_academy_theme_builder 1.0.0
zeba_academy_theme_builder: ^1.0.0 copied to clipboard
A Flutter theme builder with design tokens, color builder, typography, previews and export utilities.
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:
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:
Developer Resources:
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 ๐