functional_widget icon indicating copy to clipboard operation
functional_widget copied to clipboard

Incompatible with freezed >=3.2.0

Open rusty-snake opened this issue 4 months ago • 0 comments

Describe the bug

I can not add functional_widget to a project that already uses freezed.

  • adding both at the same time works (will select freezed 3.1.0)
  • manually downgrading freezed works too

To Reproduce

flutter create --empty functional_widget_and_freezed
cd functional_widget_and_freezed
flutter pub add dev:build_runner freezed_annotation dev:freezed
flutter pub add dev:build_runner functional_widget_annotation dev:functional_widget
"build_runner" is already in "dev_dependencies". Will try to update the constraint.
The current Dart SDK version is 3.9.2.

Because functional_widget <0.9.0 doesn't support null safety and functional_widget >=0.9.0 <0.9.0+1 depends on source_gen ^0.9.5, functional_widget <0.9.0+1 requires source_gen ^0.9.5.
And because functional_widget >=0.9.0+1 depends on build ^2.0.0, every version of functional_widget requires build ^2.0.0 or source_gen ^0.9.5.
And because freezed >=3.2.0 depends on both build ^3.0.0 and source_gen ^3.0.0, freezed >=3.2.0 is incompatible with functional_widget.
So, because functional_widget_and_freezed depends on both freezed ^3.2.0 and functional_widget any, version solving failed.

The lower bound of "sdk: '>=2.0.0-dev.68.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety
Failed to update packages.

Expected behavior

functional_widget uses recent dependency versions and works with latest freezed.

rusty-snake avatar Sep 06 '25 08:09 rusty-snake