skip to Main Content

When installing shared_preferences I get an error in the terminal that says 10 packages have newer versions incompatible with dependency constraints. Now I can’t save data. How do I fix it? thanks.

2

Answers


  1. Run the commands from your project root directory:

    1. flutter pub outdated
    2. flutter pub upgrade or flutter pub upgrade --major-versions

    This should solve the problem.

    Login or Signup to reply.
  2. You can use

    Try `flutter pub outdated` for more information.
    

    and

    flutter pub upgrade --major-versions
    flutter clean
    flutter pub get
    

    for reference go through this

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search