Upgrading equatable 1 to 2
Breaking1.2.6 → 2.1.0Breaking3Platform1Deprecated1Changed6Fixed11Other9
BreakingUpgrade verdict
3 breaking changes and a platform requirement change.
In plain terms
- The package now requires a Dart version that supports null safety, so older Dart SDKs can no longer use it.
- When a property is null, the printed output now shows the word null rather than nothing.
- The package now uses Dart's null safety, so code that uses it may need updating.
- You need Dart 3.0.0 or newer to use this version.
Must act 5 items need code or config changes
Dart SDK requirement changed in 2.1.0-dev.0: >=2.0.0 <3.0.0 → >=3.0.0 <4.0.0.
What you must change
Breaking3
Opts into null safety and upgrades the Dart SDK constraint to >=2.12.0-0 <3.0.0.
Stringify now prints "null" for null properties instead of an empty string.
Opts into null safety, which is a breaking change for existing callers.
Platform1
Requires Dart 3.0.0 or later.
Deprecations to plan for
Deprecated1
Deprecates
EquatableMixin in favor of Equatable.EquatableMixinEquatableAPI changes
Generated by DepDelta from published Dart source. Not mixed with prose notes.
- removed:
static field EquatableConfig.stringify: bool - changed:
class Equatable: abstract → class Equatable: abstract mixin - changed:
get Equatable.props: List<Object> → get Equatable.props: List<Object?> - changed:
get Equatable.stringify: bool → get Equatable.stringify: bool? - changed:
get EquatableMixin.props: List<Object> → get EquatableMixin.props: List<Object?> - changed:
get EquatableMixin.stringify: bool → get EquatableMixin.stringify: bool? - added:
static get EquatableConfig.stringify: bool - added:
static set EquatableConfig.stringify(bool value)