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

Cannot use requests in Flutter 3.3.0 project. #100

Open
djkemmet opened this issue Mar 13, 2024 · 1 comment
Open

Cannot use requests in Flutter 3.3.0 project. #100

djkemmet opened this issue Mar 13, 2024 · 1 comment

Comments

@djkemmet
Copy link

Describe the bug
Cannot add requests to Flutter 3.3.0 project via flutter pub add requests or 'dart pub add requests`

To Reproduce
Steps to reproduce the behavior:

  1. In android studio with my code open
  2. Run "Flutter pub add requests" in the terminal, which is set to my project directory.
  3. Recieve the following error:

The current Dart SDK version is 3.3.0.

Because requests >=4.1.0 depends on http ^0.13.4 and requests <4.1.0 doesn't support null safety, every version of requests requires http ^0.13.4.
So, because platform_automation_platform depends on both http ^1.2.1 and requests any, version solving failed.

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

Expected behavior
The package will install on my system and become accessible for consumption in my code.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS 14.4 (M1 Pro)
  • Browser: Chrome, latest
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device:N/a
  • OS: N/A
  • Browser N/A
  • Version N/A

Additional context
Flutter Web Project written on an M1 MacBook Pro.

@derrickgw
Copy link

This is fixed in v5.0. Unfortunately, that version has not yet been pushed to pub.dev. See #99 and #95

In the meantime you can use the override:

dependency_overrides:
  http: ^1.0.0

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

No branches or pull requests

2 participants