Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency Issue with latest flutter SDK and Connectivity Plus #1432

Closed
gaurav-webbytroops opened this issue May 23, 2024 · 6 comments · Fixed by #1438
Closed

Dependency Issue with latest flutter SDK and Connectivity Plus #1432

gaurav-webbytroops opened this issue May 23, 2024 · 6 comments · Fixed by #1438

Comments

@gaurav-webbytroops
Copy link

I tried to install the package but it is throwing error with recent flutter SDK version and Connectivity_plus package.

I get Following error in console:
`The current Dart SDK version is 3.4.1.

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
  gql_exec ^1.0.0, graphql >=5.2.0-beta.2 requires gql_exec ^1.0.0.
And because graphql_flutter >=5.0.0-nullsafety.5 <5.0.1-beta.2 depends on gql_exec ^0.3.0 and graphql_flutter
  >=5.0.0-nullsafety.5 <5.0.0 depends on graphql ^5.0.0-nullsafety.5, graphql_flutter >=5.0.0-nullsafety.5 <5.0.0 requires
  graphql >=5.0.0-nullsafety.5 <5.2.0-beta.2.
And because graphql_flutter >=5.1.1-beta.5 <5.2.0-beta.2 depends on connectivity_plus ^3.0.0 and graphql_flutter
  >=5.0.1-beta.1 <5.1.1-beta.5 depends on connectivity_plus ^2.0.3, graphql_flutter >=5.0.0-nullsafety.5 <5.0.0 or
  >=5.0.1-beta.1 <5.2.0-beta.2 requires graphql >=5.0.0-nullsafety.5 <5.2.0-beta.2 or connectivity_plus ^2.0.3 or ^3.0.0.
And because graphql_flutter >=5.0.0 <5.0.1-beta.1 depends on connectivity_plus ^1.0.1 and graphql_flutter >=0.8.0
  <5.0.0-beta.1 doesn't support null safety, graphql_flutter >=0.8.0 <5.0.0-beta.1 or >=5.0.0-nullsafety.5 <5.2.0-beta.2
  requires graphql >=5.0.0-nullsafety.5 <5.2.0-beta.2 or connectivity_plus ^1.0.1 or ^2.0.3 or ^3.0.0.
And because graphql_flutter >=0.4.0 <0.8.0 depends on http ^0.11.0 and graphql_flutter <0.4.0 doesn't support null safety,
  graphql_flutter <5.0.0-beta.1 or >=5.0.0-nullsafety.5 <5.2.0-beta.2 requires graphql >=5.0.0-nullsafety.5 <5.2.0-beta.2 or
  connectivity_plus ^1.0.1 or ^2.0.3 or ^3.0.0 or http ^0.11.0.
And because graphql_flutter >=5.2.0-beta.6 depends on connectivity_plus ^5.0.0 and graphql_flutter >=5.2.0-beta.4
  <5.2.0-beta.6 depends on connectivity_plus ^4.0.0, graphql_flutter <5.0.0-beta.1 or >=5.0.0-nullsafety.5 <5.2.0-beta.2 or
  >=5.2.0-beta.4 requires graphql >=5.0.0-nullsafety.5 <5.2.0-beta.2 or connectivity_plus ^1.0.1 or ^2.0.3 or ^3.0.0 or ^4.0.0
  or ^5.0.0 or http ^0.11.0.

(1) So, because graphql_flutter >=5.2.0-beta.3 <5.2.0-beta.4 depends on connectivity_plus ^3.0.0 and graphql_flutter
>=5.2.0-beta.2 <5.2.0-beta.3 requires SDK version >=2.12.0 <=3.0.0, graphql_flutter <5.0.0-beta.1 or >=5.0.0-nullsafety.5
requires graphql >=5.0.0-nullsafety.5 <5.2.0-beta.2 or connectivity_plus ^1.0.1 or ^2.0.3 or >=3.0.0 <4.0.0 or ^4.0.0 or
^5.0.0 or http ^0.11.0.

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
  gql_exec ^1.0.0, graphql >=5.2.0-beta.2 requires gql_exec ^1.0.0.
And because graphql_flutter >=5.0.0-beta.1 <5.0.0-nullsafety.1 depends on gql_exec ^0.3.0, graphql >=5.2.0-beta.2 is
  incompatible with graphql_flutter >=5.0.0-beta.1 <5.0.0-nullsafety.1.
Because graphql_flutter >=5.0.0-beta.1 <5.0.0-beta.2 depends on graphql ^5.0.0-beta.1 and graphql_flutter >=5.0.0-beta.2
  <5.0.0-nullsafety.1 depends on graphql ^5.0.0-beta.2, graphql_flutter >=5.0.0-beta.1 <5.0.0-nullsafety.1 requires graphql
  ^5.0.0-beta.1.
Thus, graphql_flutter >=5.0.0-beta.1 <5.0.0-nullsafety.1 requires graphql >=5.0.0-beta.1 <5.2.0-beta.2.

(2) So, because graphql_flutter >=5.0.0-nullsafety.1 <5.0.0-nullsafety.2 depends on graphql 5.0.0-nullsafety.1,
graphql_flutter >=5.0.0-beta.1 <5.0.0-nullsafety.2 requires graphql >=5.0.0-beta.1 <5.2.0-beta.2.

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
  gql_exec ^1.0.0, graphql >=5.2.0-beta.2 requires gql_exec ^1.0.0.
And because graphql_flutter >=5.0.0-nullsafety.1 <5.0.0-nullsafety.5 depends on gql_exec ^0.3.0-nullsafety.1 and
  graphql_flutter >=5.0.0-nullsafety.2 <5.0.0-nullsafety.5 depends on graphql ^5.0.0-nullsafety.3, graphql_flutter
  >=5.0.0-nullsafety.2 <5.0.0-nullsafety.5 requires graphql >=5.0.0-nullsafety.3 <5.2.0-beta.2.
And because graphql_flutter >=5.0.0-beta.1 <5.0.0-nullsafety.2 requires graphql >=5.0.0-beta.1 <5.2.0-beta.2 (2),
  graphql_flutter >=5.0.0-beta.1 <5.0.0-nullsafety.5 requires graphql >=5.0.0-beta.1 <5.2.0-beta.2.
And because graphql_flutter <5.0.0-beta.1 or >=5.0.0-nullsafety.5 requires graphql >=5.0.0-nullsafety.5 <5.2.0-beta.2 or
  connectivity_plus ^1.0.1 or ^2.0.3 or >=3.0.0 <4.0.0 or ^4.0.0 or ^5.0.0 or http ^0.11.0 (1), every version of graphql_flutter
  requires graphql >=5.0.0-beta.1 <5.2.0-beta.2 or connectivity_plus ^1.0.1 or ^2.0.3 or >=3.0.0 <4.0.0 or ^4.0.0 or ^5.0.0 or
  http ^0.11.0.
And because graphql >=5.0.0-beta.1 <5.2.0-beta.2 depends on http ^0.13.0 and neskart depends on http ^1.2.1, every version
  of graphql_flutter requires connectivity_plus ^1.0.1 or ^2.0.3 or >=3.0.0 <4.0.0 or ^4.0.0 or ^5.0.0.
So, because neskart depends on both connectivity_plus ^6.0.3 and graphql_flutter any, version solving failed.

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

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

You can try the following suggestion to make the pubspec resolve:

  • Consider downgrading your constraint on connectivity_plus: flutter pub add connectivity_plus:^5.0.2
@vincenzopalazzo
Copy link
Collaborator

we may release a new version to fix this problem?

I think this patch #1428 fix your problem

@gaurav-webbytroops
Copy link
Author

@vincenzopalazzo How can we install the graphql_flutter package to our project? The stable version is not being installed because of an error and with this commit how to install the package?

@vincenzopalazzo
Copy link
Collaborator

Idk I should google it. But I can make a new beta release also for fixing your problem

@ThomasAunvik
Copy link

ThomasAunvik commented May 27, 2024

@gaurav-webbytroops
Just like so:

graphql_flutter:
    git:
      url: https://github.com/zino-hofmann/graphql-flutter.git
      ref: c0621ccad047d3ec94565f92406ebeda394dbd4c
      path: packages/graphql_flutter

@johnmartel
Copy link
Contributor

johnmartel commented May 28, 2024

But I can make a new beta release also for fixing your problem

@vincenzopalazzo That would be awesome!

Although we can depend on the commit from #1428 , it's easier for folks who rely on Renovate/Dependabot for upgrades to stay on official releases, even if it's a beta.

@vincenzopalazzo
Copy link
Collaborator

@johnmartel it is coming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants