0

About to run this project

and upon running a command flutter pub get I got this error:

maciej@ola:~/workdir/flutter/flutter_twitter_clone$ flutter pub get
Because flutter_twitter_clone depends on flutter_link_preview ^1.5.6 which depends on http ^0.12.1, http ^0.12.1 is required.
So, because flutter_twitter_clone depends on http ^0.13.3, version solving failed.
Running "flutter pub get" in flutter_twitter_clone...                   
pub get failed (1; So, because flutter_twitter_clone depends on http ^0.13.3, version solving failed.)

This issue has already been raised in Github but not resolved yet.

how can I solve it?

1
  • 1
    did you try without version just like http: Commented Nov 27, 2021 at 18:09

1 Answer 1

1

You are having a dependency version issue, there are several ways to workaround this.

  1. Force a specific version for all dependants on package http
dependency_overrides: http: ^0.13.3
  1. Upgrade or downgrade the conflicting package(version) in your pubspec.yaml

  2. Fork the conflicting package and update its dependencies, and use your fork. Ideally you'll submit a PR to the package author.

In your particular case the latest version of this package is the one you have, and is using an old http version. So you can't do #2

So the easiest solution is #1.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.