Did you know?

There’s a subtle difference between pub get and pub upgrade:

  • pub get will get all dependencies, keeping the versions inside pubspec.lock.
  • pub upgrade will upgrade all dependencies to the latest non-major version, ignoring the pubspec.lock file.
What does flutter pub upgrade do?

Also note:

  • If pubspec.lock doesn’t exist yet, both commands behave identically.
  • Neither command updates any dependencies that are locked to a specific version (no caret syntax).

To learn more, read these resources:

Happy coding!