theme_extensions_builder
Code generator for Flutter's 3.0 ThemeExtension classes. theme_extensions_builder generator helps to minimize the required boilerplate code.
7.4.0
5.7K downloads/mo
#3652 most downloaded on pub.dev
pro100andrey/theme_extensions_builder
What this package is like to depend on
Last release 2 months ago
15 Jun 2026
Release timing varies
gaps range from 9 days to 10 months
Nearly every release is documented
notes for 27 of 27 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
31 releases · first in 2022
14 releases in the last 12 months
see the full history below
Release timeline
31 releases · Oct 2022 to Jun 2026Releases
latest 31-
7.4.015 Jun 2026Release notes
Open source →- Updated: Analyzer dependency to ">=9.0.0 <14.0.0"
- Updated:
source_genlower bound to ">=4.2.3" for analyzer 12/13 compatibility.
-
7.3.022 Mar 2026Release notes
Open source →- Updated: Analyzer dependency to ">=9.0.0 <11.0.0".
- Updated: Dependencies in example and annotation packages.
-
7.2.120 Mar 2026 -
7.2.026 Jan 2026Release notes
Open source →- New Feature: Added support for
WidgetStateProperty.lerpwith 4-parameter signature - #33 - New Feature: Added
WidgetStatePropertyLerpclass for proper code generation ofWidgetStatePropertytypes with validation for nullable generics - Improvement: Enhanced lerp method handling for instance methods with optional results, ensuring correct null safety and type casting
- Improvement: Updated code generation logic in both
@ThemeExtensionsand@ThemeGento handleWidgetStatePropertyfields with appropriate inner lerp functions - Improvement: Refactored internal analysis logic to better validate parameter types and method signatures for lerp methods
- Improvement: Added validation that throws descriptive errors when
WidgetStatePropertyis used with non-nullable generic types - Testing: Expanded test suite with new test cases for
WidgetStatePropertyand instance lerp with optional results - Code Quality: Made generator constructors const and cleaned up imports
- Updated: Dependencies to latest versions for improved compatibility
- New Feature: Added support for
-
7.1.001 Dec 2025Release notes
Open source →- Documentation: Improved internal code comments for better understanding of the codebase
- Documentation: Added
.github/README.mdwith quick start guide and installation instructions - Documentation: Separated and clarified
@ThemeExtensionsvs@ThemeGenusage patterns - Example: Enhanced example app with 5 comprehensive theme extensions:
ButtonThemeExtension- Complete button system with variants (primary, secondary, outlined, text) and sizesTypographyThemeExtension- Full typography scale (display, headline, body, label, code styles)SpacingThemeExtension- Consistent spacing system for layoutsCardThemeExtension- Customizable card componentsAppThemeExtension- Application-level colors and layout modes
- Example: Added multi-page navigation with NavigationBar showcasing different features
- Example: Custom button component with loading and disabled states
- Example: Typography and button showcase pages
- Example: Updated README with detailed feature descriptions and project structure
- Improvement: Added more unit tests for better coverage
- Improvement: Updated dependencies to latest versions
- Fixes: Various bug fixes and stability improvements
-
7.0.123 Nov 2025Release notes
Open source →- Improvement: Updated
==operator to checkruntimeType. - Improvement: Internal variable renaming in generated code to avoid conflicts.
- Improvement: Updated
-
7.0.021 Nov 2025Release notes
Open source →- Breaking changes: Removed deprecated
_$ThemeExtensionMixinmixin. Use_$[ClassName]Mixininstead. - New Feature: Added
constructorparameter to@ThemeExtensionsand@ThemeGenannotations, allowing you to specify a custom constructor name. - Improvement: Added support for inheriting fields from superclasses in both
@ThemeExtensionsand@ThemeGengenerators. - Improvement: Optimized equality checks (
==operator) to use type checking withis!instead ofruntimeTypecomparison. - Improvement: Added
==andhashCodeimplementations toFieldInfoclass for better comparison support. - Updated: Dependencies to latest versions.
- Fixes: Various bug fixes and improvements - issues/27, issues/28, Special thanks to nank1ro! for finding and reporting issues.
- Breaking changes: Removed deprecated
-
6.0.103 Oct 2025 -
6.0.002 Oct 2025Release notes
Open source →- Added:
lerpDurationproperty. - Added:
ThemeGenannotation for theme generation.
- Added:
-
6.0.0-dev.402 Oct 2025 pre-releaseNothing published for this version
-
6.0.0-dev.301 Oct 2025 pre-releaseNothing published for this version
-
6.0.0-dev.230 Sep 2025 pre-releaseNothing published for this version
-
6.0.0-dev.124 Sep 2025 pre-releaseNothing published for this version
-
5.1.117 Sep 2025Release notes
Open source →- Bug Fix: Resolved an issue in the
Object.hashAllimplementation that caused incorrect hash code generation when a theme extension contained more than 20 fields. - Dependency Updates: Updated
buildandsource_gendependencies to ensure compatibility with the latest versions.
- Bug Fix: Resolved an issue in the
-
5.1.025 Aug 2025Release notes
Open source →New Features
-
Improved Code Generation: Now using the
code_builderlibrary for generating theme extensions, which results in more structured and reliable code. -
Multiple Extensions per File: Added support for defining multiple theme extensions within a single file.
-
New
@ThemeExtensionAnnotation Property: ThecontextAccessorNameproperty has been added to the@ThemeExtensionsannotation, allowing you to customize the accessor name for your theme extension onBuildContext. -
Automatic
lerpMethod Generation: The generator now automatically createslerpmethods fordoubleand otherThemeExtensiontypes, simplifying their use in animations. -
Optimized lerp for non-interpolated types:
lerpmethod generation for types that do not have alerpmethod now uses a ternary operator (t < 0.5 ? value : otherValue). This ensures a more efficient and predictable transition between values.
Deprecations
_$ThemeExtensionMixinis Deprecated: To support multiple extensions per file, the use ofwith _$ThemeExtensionMixinhas been deprecated. Please use the newly generated mixinwith _\$[ClassName]Mixininstead.
-
-
5.1.0+126 Aug 2025 -
5.0.016 Aug 2025 -
4.0.109 Jan 2025 -
4.0.004 Jan 2025 -
3.1.026 Feb 2024 -
3.0.104 Dec 2023 -
3.0.004 Dec 2023 -
2.0.212 Jan 2023 -
2.0.122 Dec 2022 -
2.0.1+122 Dec 2022 -
2.0.1+222 Dec 2022 -
2.0.1+322 Dec 2022 -
2.0.022 Dec 2022Release notes
Open source →- Breaking changes: rename build_extensions from .g.dart to .g.theme.dart (issue)
- Updated: analyzer: ">=4.6.0 <6.0.0"
-
1.0.122 Oct 2022 -
1.0.020 Oct 2022 -
1.0.0+120 Oct 2022