chroma_theme 2.0.0
chroma_theme: ^2.0.0 copied to clipboard
A dynamic, adaptive, and highly customizable Material 3 theme management package for Flutter apps, featuring 22 pre-defined palettes, dynamic seed generation, AMOLED mode, and accessibility auditing.
Changelog #
All notable changes to chroma_theme will be documented in this file.
2.0.0 Chroma Theme 2.0 Architectural Overhaul ๐ #
๐ฅ Breaking Changes #
- The recommended pattern for application setup is now
ChromaTheme.builderwhich cleanly exposes(context, theme, darkTheme, themeMode)toMaterialApp, eliminating nested MaterialApp and Navigator routing conflicts. - Minimum Flutter SDK requirement is updated to
>=3.27.0(Dart SDK>=3.3.0 <4.0.0).
โจ Flagship Superpowers & Features #
ChromaTheme.builder: Native builder constructor that manages and injects light and darkThemeDataalong withThemeModedirectly intoMaterialApp.- Complete 44 Material 3 Roles: Full support for all 44 M3 color tokens across palettes and dynamic seeds, including
primaryFixed,secondaryFixed,tertiaryFixed,onFixedVariant,surfaceDim, andsurfaceBright. - Pure AMOLED with Accent Preservation: AMOLED mode now transforms surfaces to true
#000000while preserving the active palette's brand primary and secondary accent colors instead of washing them out. - 22 High-Contrast Palettes Registered: Wired all 22 high-contrast palettes into
PaletteRegistryusing the newPaletteEntrymodel. - Image-to-Theme Extractor (
setThemeFromImage): Extract primary and accent seeds directly from album covers, logos, or photos viacontroller.setThemeFromImage(imageProvider). - Drop-in UI Widgets:
ChromaThemeToggle: Pre-built toggle button for switching between Light, Dark, and AMOLED modes.ChromaPaletteSelector: Swatch circle selector for picking between all 22 palettes.showChromaThemeSheet(context): Ready-to-use modal bottom sheet with complete theme controls in one line of code.
- Sun-Aware Theming (
ChromaSchedule): Automatically switch between day and night theme modes based on wall-clock sunrise/sunset times. - Multi-Brand & White-Label (
ChromaBrandProfile): Register and switch between different brand profiles with custom palettes and fonts at runtime. - WCAG 2.1 Accessibility Auto-Auditor (
ChromaAuditor): W3C contrast ratio validator calculating AA and AAA compliance for all text/background pairs. - Standalone Theme Exporter (
ChromaThemeExporter): Export any active theme directly into dependency-free, pure FlutterThemeDataandColorSchemeDart source code. - Performance & Tone Caching: Optimized
ChromaTonesusingExpandocaching perColorSchemeto eliminate 78-tone recalculation overhead during UI animations. - Expanded
ChromaOverrides: Added support forbottomSheetTheme,navigationBarTheme,dialogTheme,tabBarTheme,switchTheme,checkboxTheme,radioTheme,filledButtonTheme,outlinedButtonTheme, andsegmentedButtonTheme. - New BuildContext Extensions: Added
context.chromaPrimary,context.chromaSecondary,context.chromaSurface, andcontext.toggleTheme().
๐งน Cleanups & Quality #
- Added
.pubignoreand removed promotional images from package publishing bundle, reducing package size from 1.9MB to <50KB. - Cleaned example app: deleted dead duplicate screens and removed external
chroma_kitdependency. - Added 12 comprehensive unit and widget test suites covering controllers, builders, palettes, accessibility auditor, exporter, scheduler, and drop-in widgets.
1.1.0+3 #
- Fixed README documentation links for better pub.dev compatibility.
- Streamlined installation example in README.
1.1.0+2 #
- Updated image assets to absolute GitHub URLs for better documentation rendering on pub.dev.
- Professionalized README branding with improved logo/title alignment.
1.1.0 #
- Added 20+ curated predefined palettes including Neon Forest, Ocean Signal, Midnight Mint, Royal Berry, and more.
- Improved palette surface generation for cleaner (less muddy) neutral surfaces.
- Added full ColorScheme visualization upgrades in the example app (including neutralVariant tones and state-layer previews).
- Expanded settings UI to list and select all predefined palettes.
- Added
neutralVariantinChromaTonesfor fuller Material 3 tonal coverage. - Improved controller/theme integration behavior.
0.0.1 #
- Initial release.