Skip to content

Cannot use requests in Flutter 3.3.0 project. #100

@djkemmet

Description

@djkemmet

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions