zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.23k stars 613 forks source link

Minor Dart SDK compatibility issue (3.0.0 -> 3.0.3) #1347

Closed ITP2023 closed 1 year ago

ITP2023 commented 1 year ago

minor dart sdk compatibility issue Tried adding the graphql and graphql_flutter to my project but the following error showed up:

The current Dart SDK version is 3.0.3.

Because graphql >=5.2.0-beta.2 <5.2.0-beta.3 requires SDK version >=2.15.0
  <=3.0.0 and graphql >=5.2.0-beta.3 depends on http ^0.13.0, graphql
  >=5.2.0-beta.2 requires http ^0.13.0.
And because graphql <5.0.0-beta.1 doesn't support null safety and graphql
  >=5.0.0-beta.1 <5.2.0-beta.2 depends on http ^0.13.0, every version of graphql
  requires http ^0.13.0.
So, because app depends on both http ^1.0.0 and graphql any, version
  solving failed.

The lower bound of "sdk: '>=1.19.0 <2.0.0 or >=2.2.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.

To Reproduce running flutter pub add <graphql|graphql_flutter>

Note I think it's due to the package only being compatible with Dart SDK 3.0.0 but I am currently working with v3.0.3? Any thoughts on this?

ITP2023 commented 1 year ago

although when I create a new flutter project and add the packages, everything functions smoothly, so I don't get what is the problem exactly

vincenzopalazzo commented 1 year ago

Is it your dart version inside the project? or do you need to install the last version?

ITP2023 commented 1 year ago

Is it your dart version inside the project? or do you need to install the last version?

I have only Dart v3.0.3 in both projects

vincenzopalazzo commented 1 year ago

Do you have the last packages beta too?

vincenzopalazzo commented 1 year ago

Closing because I suspect the issue is fixed