Skip to content

Upgrading freezed 2 to 3

Breaking2.5.8 → 3.2.5Breaking2Platform2New5Changed12Fixed7Other3

Fetching 15 releases from GitHub…14 / 15
BreakingUpgrade verdict

2 breaking changes and 2 platform requirement changes.

  • The map and when helper methods are gone; use Dart pattern matching instead.
  • Existing Freezed classes may need to be marked abstract or sealed, or implement the generated interface themselves, to keep compiling.
  • You need at least Dart 3.8.0 and analyzer 7.5.9 to use this version.
  • You now need Dart 3.6.0 or newer and analyzer 6.9.0 or newer to use this version.
4 items need code or config changes

Dart SDK requirement changed in 3.2.0: >=3.0.0 <4.0.0 → >=3.8.0 <4.0.0.

Adds pub_semver ^2.2.0.

Breaking2
Removes map/when and their variants.
mapwhen
Freezed classes must now be abstract, sealed, or manually implement _$MyClass.
_$MyClass
Platform2
Requires Dart 3.8.0 and analyzer 7.5.9 as a minimum.
analyzer
Raises the minimum supported Dart SDK to 3.6.0 and analyzer to 6.9.0.