PackageTrack
Sign in Get early access

mix_annotations

Annotations for mix and mix_generator

2.1.3 21K downloads/mo #2157 most downloaded on pub.dev btwld/mix

What this package is like to depend on

Last release 1 months ago

24 Jul 2026

Release timing varies

gaps range from 9 days to 7 months

Nearly every release is documented

notes for 14 of 14 stable releases

Nothing withdrawn

no release was ever pulled

2 years old

18 releases · first in 2024

8 releases in the last 12 months

see the full history below

Release timeline

18 releases · Jun 2024 to Jul 2026
2025 2026
Release Pre-release

Releases

latest 18
  1. 2.2.0-beta.1 24 Jul 2026 pre-release
    Release notes

    mix_annotations-v2.2.0-beta.1

    Open source →
    Release notes
    • FEAT: Add MixWidget.target for plain widget constructor tear-offs and factoryParameters for independent recipe parameter curation.
    Open source →
  2. 2.2.0-beta.0 15 Jul 2026 pre-release
    Release notes
    • FEAT: Add MixableField.forwardStyler and stylerSurface for opt-in projection of a nested generated Styler's canonical named-factory surface onto its parent Styler (#983).
    • DOCS: Document the construction and fluent-method contract for a custom setterType combined with forwardStyler.
    Open source →
  3. 2.1.3 13 Jul 2026
    Release notes
    • FEAT: Add MixWidgetParameterSelection and the MixWidget.widgetParameters default. @MixWidget() now concretely carries .all(), while .only({...}) supports opt-in curation of generated widget value parameters. Factory parameters, valid Key? key, and method-level type parameters remain automatic.
    Open source →
  4. 2.1.2 12 Jul 2026
    Release notes
    • DOCS: Document that nested StyleSpec<XSpec> fields derive XStyler automatically by convention, so @MixableField(setterType:) is only needed to override the derived name (#961).
    Open source →
  5. 2.1.1 03 Jul 2026
    Release notes
    • DOCS: Document @MixableField(setterType:) usage for @MixableSpec and @MixableModifier fields (#950, #951).
    Open source →
  6. 2.1.0 26 Jun 2026
    Release notes
    • FEAT: Add @MixableModifier annotation. Annotate a WidgetModifier subclass to generate its modifier mixin and ModifierMix class via mix_generator (#924).
    • FEAT: Add @MixWidget annotation. Annotate a top-level styler variable or styler-returning function so mix_generator emits a matching StatelessWidget (#920).
    • FEAT: Add extraStylerMixins to control additional mixins applied to generated stylers, and related generator_flags updates (#923).
    • DEPRECATED: GeneratedStylerMethods.call and GeneratedStylerMethods.skipCall. Call generation has not been supported since the 2.0 styler API; the flags are now annotated @Deprecated and will be removed in a future major release. The bit (0x20) remains in GeneratedStylerMethods.all for source and value compatibility — the generator already ignores it.
    • DOCS: Spec authoring examples in the README now include package:flutter/foundation.dart and package:flutter/widgets.dart imports plus the @immutable annotation, matching the symbols the generated _$<Name> mixin references.
    • DOCS: Note that GeneratedSpecMethods.skipEquals suppresses only the generated props getter; the surrounding equality surface is always emitted so a user-authored props powers a working ==/hashCode/getDiff/stringify.
    Open source →
    Release notes

    This release adds context-derived token resolution and richer animation configuration, fixes variant resolution in nested styles and animation interpolation edge cases, and hardens the token-reference system while tightening the public API around the internal token registry.

    New features

    • ContextToken : Zero-config token whose value is derived directly from the build context, so context-dependent values resolve without first registering a token in a scope (#938).

    • Spring animation helpers: AnimationConfig statics are now factories, with added spring-curve wrappers for configuring physics-based transitions (#937).

    Fixes

    • Variants in nested styles: A Style nested inside another style's Prop (a component sub-style) now applies its own context variants — widget states, brightness, breakpoints. Previously Prop.resolveProp resolved the merged nested style via resolve() , which skips variants. No-op for nested styles without variants (#926).

    • Matrix4 interpolation: Tween a transform against the identity matrix when one endpoint is null, instead of producing a degenerate result (#931).

    • Animation config fallback: Fall back to the previous animation config when a transition resolves to null, rather than dropping the animation (#930).

    • DoubleRef sentinel collisions: Two distinct MixToken<double> instances whose hashes landed in the same bucket previously aliased to the same sentinel. The registry now hands out sentinels from a monotonic counter, so sentinels are unique among registered tokens; a reverse cache re-issues the same sentinel for the same token.

    • BreakpointToken.resolve no longer masks type errors: the built-in mobile / tablet / desktop defaults are only used when the scope is absent or omits the entry. A scope entry of the wrong type now surfaces the underlying StateError from MixScope.getToken .

    • Numeric directives on multi-source props: Prop.value(x).mergeProp( Prop.token(t)).multiply(2) and similar chains now resolve instead of throwing — _asPropNum rebuilds every source as Prop<num> and merges in order.

    • Prop.value null safety: the token-ref detection branch no longer crashes when V is nullable and the supplied value is null .

    API changes

    • ValueRef.noSuchMethod throws UnsupportedError (was UnimplementedError ). The detailed message is unchanged; only the error type differs. Any user code that catches the specific class needs to switch.

    • getReferenceValue no longer silently casts an unsupported token type — it now throws UnsupportedError naming the token and T . All concrete MixToken subclasses override call() and never hit this path; the change only affects custom MixToken authors who relied on the cast.

    • Removed from the public API: clearTokenRegistry and getTokenFromValue are no longer re-exported from package:mix/mix.dart (both are now @internal ; tests reach them via package:mix/src/... ). The public DoubleRef(double) constructor was removed — DoubleRef instances are only ever obtained through MixToken<double>.call() . For an explicit, type-safe handle to a double token, use Prop.token(token) .

    • isAnyTokenRef drops the brittle runtimeType.toString().endsWith(...) check; a Prop carrying a TokenSource is now the sole class-based invariant.

    Other changes

    • StyleWidget defaults to IdentityStyle<Spec> , giving widgets a well-defined no-op style when none is supplied (#921).
    Open source →
  7. 2.0.0 30 Mar 2026
    Release notes

    Mix 2.0 is a ground-up rethink of how styling works in Flutter. This release introduces Styler-first APIs with fluent chaining, leverages Dart 3.11+ dot shorthands for concise syntax, modernizes the widget modifier model, and adds full code generation for specs and stylers via mix_annotations / mix_generator .

    Breaking changes

    • Styler APIs replace legacy $ utilities. BoxStyler() , TextStyler() , IconStyler() , and related stylers are the primary styling surface. All deprecated spec utilities, legacy widget/style entry points, and unused enum/color helpers have been removed (#806, #870).

    • Widget modifiers now use WidgetModifierConfig construction instead of older patterns (#775).

    • Internal resolver usage: resolveProp is @internal ; use MixOps.resolve where you relied on the previous surface (#833).

    • Minimum SDK: Dart >=3.11.0 , Flutter >=3.41.0 .

    • Styled widget naming: Legacy Styled* widget names deprecated in favor of new naming conventions (#619).

    • NestedStyleAttribute removed: Migrate to direct Style usage (#644).

    • SpecConfiguration/SpecStyle removed from environment (#656).

    • MixWidgetState renamed to MixWidgetStateModel (#698); MixWidgetStateController deprecated (#586).

    New features

    • Fluent Styler API: Build styles with chained method calls — BoxStyler().color(Colors.blue).size(100, 100).paddingAll(16) .

    • Styler dot shorthands: Static factory constructors on stylers for Dart 3.11 dot-notation syntax (#857).

    • Named variants: applyVariants() for applying NamedVariant sets in one place (#801).

    • Style lookup: Style.of() and Style.maybeOf() for reading resolved styles from the widget tree (#784).

    • Layout widgets: Callable Stack / FlexBox (and related) for concise composition; Stack / StackBox restructured for the 2.0 model (#779).

    • Widget builder pattern: Ergonomic Mix API through widget builders (#754).

    • Default widget styles: Mix widgets ship with sensible defaults out of the box (#759).

    • Numeric styling: Number directives and extensions for numeric transforms in styles (#785).

    • Defaults: DefaultStyledText and DefaultStyledIcon typedefs for consistent defaults (#767).

    • Codegen: MixableSpec / MixableStyler generation, MixableField.setterType , and Style-class extension support in mix_generator (#835, #846, #845).

    • Animation loops: Loop support for Phase and Keyframe animations (#824).

    • Unified attributes: SpecUtility , Style , and Attributes unified as compatible values (#643).

    • Style-focused modifiers and specs: Generated modifiers and specs for streamlined styling (#652).

    • Builder optimization: Improved style builder performance (#629).

    Improvements

    • Widget state variant mixins split into focused files; unsupported widget state variants removed (#768, #769).

    • StyleSpecBuilder build path simplified (#825).

    • Specs standardized with @immutable ; clearer equality behavior (#821).

    • BaseStyle utility class introduced for improved styling architecture (#659).

    • Widget state handling moved from MixBuilder to SpecBuilder (#651).

    • Docs, examples, and codebase updated to dot-shorthand / Styler syntax throughout.

    Fixes

    • Variants: More reliable VariantStyle merge and widget state handling in StyleBuilder (#774, #765).

    • copyWith / lerp: Nullable copyWith parameters; lerp respects nullability (including generator fixes) (#848, #849).

    • Stylers: chain getter on StackStyler ; AnimationStyleMixin on FlexBoxStyler and StackBoxStyler (#818, #819).

    • Animations: Visibility stays correct through the end of exit animations (#771). Animation drivers no longer reset when animation configuration is unchanged (#859).

    • Equality: Mixable now extends EqualityMixin instead of StyleElement (#648).

    • CopyWith: Overriding bug fixed (#622).

    • Breakpoints: Breakpoint utility merge exception resolved (#758).

    Open source →
  8. 2.0.0-rc.1 06 Feb 2026 pre-release
    Release notes
    • BREAKING: The Mix Generator was completely rebuilt to support the architecture and requirements of Mix V2.0.
    • FEAT: Add setterType parameter to MixableField annotation (#846).
    • FEAT: Add MixableSpec and MixableStyler annotations (#835).
    • REFACTOR: Widget modifier API and update to Dart 3.10 (#775).
    Open source →
  9. 1.7.0 02 Jul 2025
    Release notes
    • REFACTOR: Implement BaseStyle utility class and improve styling architecture (#659)
    • REFACTOR: Remove SpecConfiguration and SpecStyle from environment (#656)
    • REFACTOR: Move widget state handling from MixBuilder to SpecBuilder (#651).
    • REFACTOR: Rename WidgetModifiersData to WidgetModifiersConfig (#649).
    • REFACTOR: Fix deprecations and modernize codebase (#647).
    • REFACTOR: Remove NestedStyleAttribute and migrate to direct Style usage (#644).
    • REFACTOR: Deprecate MixWidgetStateController (#586).
    • REFACTOR: Use WidgetState instead of MixWidgetState (#582).
    • FIX: Change Mixable to extend EqualityMixin instead of StyleElement (#648).
    • FIX: CopyWith overriding bug (#622).
    • FEAT: builder optimization (#629).
    • FEAT: deprecate styled widgets in favor of new naming conventions (#619).
    • FEAT: Implementing duration extension for int (#634).
    • FEAT: Create MixBuilder (#581).
    • FEAT: Add generated style-focused modifiers and specs (#652).
    • FEAT: Unify SpecUtility, Style, and Attributes as compatible values (#643).
    • FEAT: Add utilities for animatedData (#660).
    • FEAT: Add focused style classes for spec utilities (#677)
    Open source →
    Release notes
    • FEAT: Add generated style-focused modifiers and specs (#652).
    Open source →
    Release notes
    • REFACTOR : Implement BaseStyle utility class and improve styling architecture #659

    • REFACTOR : Remove SpecConfiguration and SpecStyle from environment (#656)

    • REFACTOR : Move widget state handling from MixBuilder to SpecBuilder (#651).

    • REFACTOR : Rename WidgetModifiersData to WidgetModifiersConfig (#649).

    • REFACTOR : Fix deprecations and modernize codebase (#647).

    • REFACTOR : Remove NestedStyleAttribute and migrate to direct Style usage (#644).

    • REFACTOR : Deprecate MixWidgetStateController (#586).

    • REFACTOR : Use WidgetState instead of MixWidgetState (#582).

    • FIX : Change Mixable to extend EqualityMixin instead of StyleElement (#648).

    • FIX : CopyWith overriding bug (#622).

    • FEAT : builder optimization (#629).

    • FEAT : deprecate styled widgets in favor of new naming conventions (#619).

    • FEAT : Implementing duration extension for int (#634).

    • FEAT : Create MixBuilder (#581).

    • FEAT : Add generated style-focused modifiers and specs (#652).

    • FEAT : Unify SpecUtility, Style, and Attributes as compatible values (#643).

    • FEAT : Add utilities for animatedData (#660).

    • FEAT : Add focused style classes for spec utilities (#677)

    Open source →
  10. 1.7.0-beta.0 23 Jun 2025 pre-release
    Release notes
    • REFACTOR: Implement BaseStyle utility class and improve styling architecture (#659)
    • REFACTOR: Remove SpecConfiguration and SpecStyle from environment (#656)
    • REFACTOR: Move widget state handling from MixBuilder to SpecBuilder (#651).
    • REFACTOR: Rename WidgetModifiersData to WidgetModifiersConfig (#649).
    • REFACTOR: Fix deprecations and modernize codebase (#647).
    • REFACTOR: Remove NestedStyleAttribute and migrate to direct Style usage (#644).
    • REFACTOR: Deprecate MixWidgetStateController (#586).
    • REFACTOR: Use WidgetState instead of MixWidgetState (#582).
    • FIX: Change Mixable to extend EqualityMixin instead of StyleElement (#648).
    • FIX: CopyWith overriding bug (#622).
    • FEAT: builder optimization (#629).
    • FEAT: deprecate styled widgets in favor of new naming conventions (#619).
    • FEAT: Implementing duration extension for int (#634).
    • FEAT: Create MixBuilder (#581).
    • FEAT: Add generated style-focused modifiers and specs (#652).
    • FEAT: Unify SpecUtility, Style, and Attributes as compatible values (#643).
    • FEAT: Add utilities for animatedData (#660).
    • FEAT: Add focused style classes for spec utilities (#677)
    Open source →
  11. 0.4.0 31 Mar 2025
    Release notes
    • REFACTOR: Rename MixableProperty to MixableType (#574).
    • REFACTOR: mix generator clean up and mix semantic changes (#569).
    Open source →
  12. 0.3.2 31 Mar 2025
    Release notes
    • REFACTOR: Rewrite Fortaleza theme using the new code gen for tokens (#528).
    • FIX: Shadow list animation (#445).
    • FEAT: Create code gen for design tokens (#521).
    • FEAT: Rewrite FlexBox as a Mix's primitive component (#517).
    • FEAT: Fluent API (#475).
    • FEAT: Remix improvements and further improvements (#410).
    Open source →
  13. 0.3.1 06 Dec 2024
    Release notes
    • FEAT: Create code gen for design tokens (#521).
    Open source →
  14. 0.3.0 22 Aug 2024
    Release notes
    • FIX: SpecModifiers were taking a long time to animate. (#457).
    Open source →
  15. 0.2.1 26 Jul 2024
    Release notes
    • FEAT: MixableSpec now supports withCopyWith, withEquality, withLerp, and skipUtility (#396).
    Open source →
  16. 0.2.0 27 Jun 2024
    Release notes
    • Added MixableEnumUtility, and MixableClassUtility annotations.
    Open source →
  17. 0.2.0+1 12 Jul 2024
    Release notes
    • REFACTOR: bump flutter version to 3.19.0 (#365).
    Open source →
  18. 0.1.0 19 Jun 2024
    Release notes
    • Initial version.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive