NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #3388 most downloaded on pub.dev
Code generator for Flutter's 3.0 ThemeExtension classes. theme_extensions_builder generator helps to minimize the required boilerplate code.
Last release 1 months ago
06 Sep 2026
Release timing varies
gaps range from 9 days to 10 months
Nearly every release is documented
notes for 28 of 28 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
32 releases · first in 2022
Breaking: hashCode changes for classes that inherit fields, which now come after the class' own.
hashCode changes for classes that inherit fields, which now come after the class' own.lerp keeps the endpoints when one side is null (t = 0 gives a, t = 1 gives b), and merge keeps the current value when the incoming one is null.with _$X, a field named copyWith, merge or lerp, a @ThemeExtensions class not extending ThemeExtension<Self>, or an invalid contextAccessorName now stop the build with a message naming the class and the fix.lerp on a nullable field or with a nullable result, a non-nullable lerp/merge parameter on a nullable field, a static call on Box<int> instead of Box, a method declared on a supertype (the result is cast back), a generic field type (methods resolve through the instantiated type), and a field inherited from a generic superclass (T is substituted).lerp or merge no longer fails the build or is mistaken for a supported one; an unusable signature is a build warning naming the field and its fallback.WidgetStateProperty generic has to offer a static lerp that accepts nulls, and is reported once when it does not; a non-nullable generic is an error at the field, a nested one falls back; double and Duration generics are detected by element.implements contributes nothing, private and static fields are skipped, and @ignore on a redeclaration drops the inherited one. Duration is detected by element.@ThemeGen class, or a subclass of one, merges the same way on clean and incremental builds; a hand-written merge is used as declared.const follows the constructor named in constructor:; constructor: '' selects the unnamed one.ThemeGen is not taken for one.>=13.1.0 <15.0.0 (the lower bound CI tests against) and Dart SDK >=3.13.0 <4.0.0; collection and meta are no longer dependencies; the platforms key is gone from the pubspec.One column per quarter.
*Updated*: Analyzer dependency to ">=9.0.0 <14.0.0"
source_gen lower bound to ">=4.2.3" for analyzer 12/13 compatibility.*Updated*: Analyzer dependency to ">=9.0.0 <11.0.0".
*Update*: Improved documentation.
New Feature: Added support for WidgetStateProperty.lerp with 4-parameter signature - #33
WidgetStateProperty.lerp with 4-parameter signature - #33WidgetStatePropertyLerp class for proper code generation of WidgetStateProperty types with validation for nullable generics@ThemeExtensions and @ThemeGen to handle WidgetStateProperty fields with appropriate inner lerp functionsWidgetStateProperty is used with non-nullable generic typesWidgetStateProperty and instance lerp with optional resultsDocumentation: Improved internal code comments for better understanding of the codebase
.github/README.md with quick start guide and installation instructions@ThemeExtensions vs @ThemeGen usage patternsButtonThemeExtension - 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 modesImprovement: Updated == operator to check runtimeType.
== operator to check runtimeType.Breaking changes: Removed deprecated _$ThemeExtensionMixin mixin. Use _$[ClassName]Mixin instead.
_$ThemeExtensionMixin mixin. Use _$[ClassName]Mixin instead.constructor parameter to @ThemeExtensions and @ThemeGen annotations, allowing you to specify a custom constructor name.@ThemeExtensions and @ThemeGen generators.== operator) to use type checking with is! instead of runtimeType comparison.== and hashCode implementations to FieldInfo class for better comparison support.*Fixed*: lerpDuration$, lerpDouble$ calculation in case of null values.
lerpDuration$, lerpDouble$ calculation in case of null values.*Added*: lerpDuration property.
lerpDuration property.ThemeGen annotation for theme generation.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Bug Fix: Resolved an issue in the Object.hashAll implementation that caused incorrect hash code generation when a theme extension contained more than
Object.hashAll implementation that caused incorrect hash code generation when a theme extension contained more than 20 fields.build and source_gen dependencies to ensure compatibility with the latest versions.`_$ThemeExtensionMixin` is Deprecated: To support multiple extensions per file, the use of with _$ThemeExtensionMixin has been deprecated. Please use…
Improved Code Generation: Now using the code_builder library 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 @ThemeExtension Annotation Property: The contextAccessorName property has been added to the @ThemeExtensions annotation, allowing you to customize the accessor name for your theme extension on BuildContext.
Automatic lerp Method Generation: The generator now automatically creates lerp methods for double and other ThemeExtension types, simplifying their use in animations.
Optimized lerp for non-interpolated types: lerp method generation for types that do not have a lerp method now uses a ternary operator (t < 0.5 ? value : otherValue). This ensures a more efficient and predictable transition between values.
_$ThemeExtensionMixin is Deprecated: To support multiple extensions per file, the use of with _$ThemeExtensionMixin has been deprecated. Please use the newly generated mixin with _\$[ClassName]Mixin instead.- Fixed typo's
- *Updated*: dependencies.
- *Updated*: dependencies. - *Added*: DartFormatter. - *Fix*: element type.
*Updated*: dependencies. Min sdk: 3.6.0
*Updated*: dependencies. Min sdk: 3.3.0
*Fixed*: dependencies. Thanks felix-barz-brickmakers!
*Updated*: dependencies. Min sdk: 3.0.0
*Fixed*: generate lerp method issue for MaterialStateProperty
lerp method issue for MaterialStateProperty*Updated*: theme_extensions_builder_annotation: ^2.0.0
theme_extensions_builder_annotation: ^2.0.0- *Updated*: readme
- *Updated*: readme, doc
- *Updated*: for scores
*Breaking changes*: rename build_extensions from .g.dart to .g.theme.dart (issue)
*Added*: Support for types that do not implement method lerp
- *Updated*: for scores
- Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →