PackageTrack
Sign in Get early access

freezed_annotation

Annotations for the freezed code-generator. This package does nothing without freezed too.

3.1.0 3.6M downloads/mo #174 most downloaded on pub.dev rrousselGit/freezed

What this package is like to depend on

Last release 1 years ago

02 Jul 2025

Release timing varies

gaps range from 2 weeks to 12 months

Nearly every release is documented

notes for 25 of 26 stable releases

1 version withdrawn

withdrawn after publishing

7 years old

29 releases · first in 2020

0 releases in the last 12 months

see the full history below

Release timeline

29 releases · Feb 2020 to Jul 2025
2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 29
  1. 3.1.0 02 Jul 2025
    Release notes

    Added when/map back

    Open source →
  2. 3.0.0 25 Feb 2025
    Release notes
    • Breaking removed when/map related options
    Open source →
  3. 2.4.4 15 Jul 2024
    Release notes
    • Require json_annotation ^4.8.0
    Open source →
  4. 2.4.3 09 Jul 2024 withdrawn
    Release notes
    • Stop using JsonKey(ignore: true) in favour of JsonKey(includeFromJson: false, includeToJson: false) (thanks to @lrsvmb)
    Open source →
  5. 2.4.2 02 Jul 2024
    Release notes
    • Require Dart >=3.0.0
    • Support latest collection
    Open source →
  6. 2.4.1 12 Jul 2023
    Release notes
    • The generic type of @With/@Implements now defaults to Object? instead of dynamic
    • Allow enabling/disabling all when/map variants at once (thanks to @gaetschwartz)
    Open source →
  7. 2.2.0 14 Oct 2022
    Release notes
    • Re-introduced @With.fromString and @Implements.fromString to allow unions to implement generic types. (thanks to @rorystephenson)
    Open source →
  8. 2.1.0 15 Jul 2022
    Release notes
    • Add support for de/serializing generic Freezed classes (Thanks to @TimWhiting)
    Open source →
  9. 2.0.3 06 May 2022
    Release notes

    – fix: build.yaml decoding crash

    Open source →
  10. 2.0.1 20 Apr 2022
    Release notes
    • Fixed a bug where the generated when/map methods were potentially invalid when using default values
    • Fixed a bug where when/map methods were generated even when not necessary
    Open source →
  11. 2.0.0 19 Apr 2022
    Release notes
    • Breaking: freezed_annotation no-longer exports the entire package:collection

    • Breaking Removed @Freezed(maybeMap: ) & @Freezed(maybeWhen: ) in favor of a separate:

      @Freezed(map: FreezedMap(...), when: FreezedWhenOptions(...))
      
    • Feat: Add screaming snake union case type (#617) (thanks to @zbarbuto)

    • Added @unfreezed as a variant to @freezed, for mutable classes

    Open source →
  12. 1.1.0 11 Dec 2021
    Release notes

    Added support for disabling the generation of maybeMap/maybeWhen (thanks to @Lyokone)

    Open source →
  13. 1.0.0 16 Nov 2021
    Release notes

    freezed_annotation is now stable

    Open source →
  14. 0.15.0 08 Oct 2021
    Release notes
    • Breaking Changed the syntax for @With and @Implements to use a generic annotation. Before:

      @With(MyClass)
      @With.fromString('Generic<int>')
      

      After:

      @With<MyClass>()
      @With<Generic<int>>()
      
    Open source →
  15. 0.14.3 17 Jul 2021
    Release notes

    Upgraded to support last json_annotation version

    Open source →
  16. 0.14.2 13 May 2021
    Release notes
    • Added the ability to specify a fallback constructor when deserializing unions (thanks to @Brazol)
    Open source →
  17. 0.14.1 14 Mar 2021
    Release notes
    • Added the ability to customise the JSON value of a union. See https://github.com/rrousselGit/freezed#fromjson---classes-with-multiple-constructors for more information (Thanks to @ookami-kb)
    Open source →
  18. 0.14.0 04 Mar 2021
    Release notes
    • Stable null safety release

    • removed @nullable. Instead of:

      factory Example({@nullable int a}) = _Example;
      

      Do:

      factory Example({int? a}) = _Example;
      
    • removed @late. Instead of:

      abstract class Person with _$Person {
        factory Person({
          required String firstName,
          required String lastName,
        }) = _Person;
      
        @late
        String get fullName => '$firstName $lastName';
      }
      

      Do:

      abstract class Person with _$Person {
      Person._();
      factory Person({
        required String firstName,
        required String lastName,
      }) = _Person;
      
      late final fullName = '$firstName $lastName';
      }
      
    Open source →
  19. 0.13.0-nullsafety.0 23 Jan 2021 pre-release
    Release notes
    • Migrated to null safety

    • removed @nullable. Instead of:

      factory Example({@nullable int a}) = _Example;
      

      Do:

      factory Example({int? a}) = _Example;
      
    • removed @late. Instead of:

      abstract class Person with _$Person {
        factory Person({
          required String firstName,
          required String lastName,
        }) = _Person;
      
        @late
        String get fullName => '$firstName $lastName';
      }
      

      Do:

      abstract class Person with _$Person {
      Person._();
      factory Person({
        required String firstName,
        required String lastName,
      }) = _Person;
      
      late final fullName = '$firstName $lastName';
      }
      
    Open source →
  20. 0.12.0 19 Sep 2020
    Release notes
    • Added Assert decorator to generate assert(...) statements on Freezed classes:

      abstract class Person with _$Person {
        @Assert('name.trim().isNotEmpty', 'name cannot be empty')
        @Assert('age >= 0')
        factory Person({
          String name,
          int age,
        }) = _Person;
      }
      
    • Added a way to customize the de/serialization of union types using the @Freezed(unionKey: 'my-key') decorator.

      See also https://github.com/rrousselGit/freezed#fromjson---classes-with-multiple-constructors

    Open source →
  21. 0.11.0 13 Jun 2020
    Release notes
    • Added @With and @Implements decorators to allow only a specific constructor of a union type to implement an interface:

      @freezed
      abstract class Example with _$Example {
        const factory Example.person(String name, int age) = Person;
      
        @Implements(GeographicArea)
        const factory Example.city(String name, int population) = City;
      }
      

      Thanks to @long1eu~

    Open source →
  22. 0.11.0+1 02 Aug 2020

    Nothing published for this version

  23. 0.11.0-dev 01 Jun 2020 pre-release

    Nothing published for this version

  24. 0.7.1 24 Feb 2020
    Release notes

    Minor change to @Default to fix an issue with complex default values.

    Open source →
  25. 0.7.0 21 Feb 2020
    Release notes

    Add @Default annotation

    Open source →
  26. 0.6.0 15 Feb 2020
    Release notes

    Added @late annotation.

    Open source →
  27. 0.4.0 13 Feb 2020
    Release notes

    Added a @nullable annotation.

    Open source →
  28. 0.3.1 13 Feb 2020
    Release notes

    Change version of collection to work with flutter_test.

    Open source →
  29. 0.3.0 13 Feb 2020
    Release notes

    Initial release of the annotation package.

    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