heywhy / flutter-pusher-client

A pusher.com client written with dart for flutter
MIT License
9 stars 30 forks source link

Version resolving failed with: json_annotation ^4.0.0 #20

Open zohaib-rentalmoose opened 3 years ago

zohaib-rentalmoose commented 3 years ago

Dear developer, i'm trying to use this package with riverpod, but because your plugin is depends on json_annotation ^3.0.0 and riverpod is using json_annotation ^4.0.0, I'm getting this error

Because flutter_riverpod ^0.13.1 depends on riverpod ^0.13.1 and no versions of riverpod match >0.13.1 <0.14.0, flutter_riverpod ^0.13.1 requires riverpod 0.13.1.

And because riverpod 0.13.1 depends on freezed_annotation ^0.14.0, flutter_riverpod ^0.13.1 requires freezed_annotation ^0.14.0.

And because freezed_annotation >=0.14.0 depends on json_annotation ^4.0.0 and every version of flutter_pusher_client depends on json_annotation ^3.0.0, flutter_riverpod ^0.13.1 is incompatible with flutter_pusher_client.

So, because movitronic depends on both flutter_pusher_client ^0.3.1 and flutter_riverpod ^0.13.1, version solving failed. pub get failed (1; So, because movitronic depends on both flutter_pusher_client ^0.3.1 and flutter_riverpod ^0.13.1, version solving failed.) exit code 1

fixer112 commented 3 years ago

pls am having this issue too... pls we need a fix

YassineChe commented 3 years ago

pls am having this issue too... pls we need a fix

Hello, I solved this problem by overriding this package Add these lines in your pubspec.yaml

dependency_overrides:
  json_annotation: ^4.0.0

Its work for me, Best Regards.

YassineChe commented 3 years ago

Same solution works for flutter_pusher: ^1.0.2 package too! Good luck!

nicolasvahidzein commented 3 years ago

This was a lifesaver but can we update the package pretty please? Thank you so much for all your hard work by the way.