flutter_avif icon indicating copy to clipboard operation
flutter_avif copied to clipboard

Dependency conflict with protobuf: blocks updating other packages

Open AccFerreira opened this issue 2 months ago • 2 comments

Hi, I'm facing a dependency conflict because this package's requirement for protobuf: ^3.1.0 is blocking updates for other packages. Specifically I'm trying to update clarity_flutter which now depends on protobuf: ^4.0.0 or newer. This creates a version lock. Here is the error from flutter pub get:

Resolving dependencies...
Because no versions of flutter_avif match >3.1.0 <4.0.0 and flutter_avif 3.1.0 depends on flutter_avif_platform_interface ^3.1.0, flutter_avif ^3.1.0 requires flutter_avif_platform_interface ^3.1.0.
And because no versions of flutter_avif_platform_interface match >3.1.0 <4.0.0, flutter_avif ^3.1.0 requires flutter_avif_platform_interface 3.1.0.
And because flutter_avif_platform_interface 3.1.0 depends on protobuf ^3.1.0 and clarity_flutter >=1.4.0 depends on protobuf ^4.2.0, flutter_avif ^3.1.0 is incompatible with clarity_flutter >=1.4.0.
So, because my_project depends on both clarity_flutter ^1.4.2 and flutter_avif ^3.1.0, version solving failed.

Could you please consider updating the protobuf dependency to ^4.0.0? It would resolve this compatibility issue for many users. Thanks!

AccFerreira avatar Oct 10 '25 12:10 AccFerreira

Second that ;)

Solido avatar Oct 14 '25 15:10 Solido

dependency_overrides:
  protobuf: ^4.0.0

runoob-coder avatar Oct 22 '25 09:10 runoob-coder