Hiprup

What's the difference between `flutter pub get`, `flutter pub upgrade`, and `flutter pub outdated`?

Three related commands with very different behavior:

flutter pub get — fetches dependencies as specified in pubspec.yaml and respects pubspec.lock. Installs EXACT locked versions if the lock file exists. Run after pulling, cloning, or editing pubspec.yaml.

flutter pub upgrade — re-resolves all dependencies to the LATEST allowed by your version constraints (within your ^1.2.3 ranges). Updates pubspec.lock. Use sparingly. --major-versions rewrites the ^ ranges in pubspec.yaml itself to cross major boundaries.

flutter pub outdated — read-only audit. Shows current / upgradable / resolvable / latest for every dependency. Doesn't change anything. Great for CI / dependency hygiene.

The mental model: get reads pubspec.lock, upgrade rewrites it within the version ranges. The senior detail is flutter pub outdated — most candidates don't know about it, but production teams run it in CI to catch stale deps before they become security risks. Mention --major-versions for the intentional cross-major bump — that signals real dependency hygiene experience.

What's the difference between `flutter pub get`, `flutter pub upgrade`, and `flutter pub outdated`? | Hiprup