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 inpubspec.yamland respectspubspec.lock. Installs EXACT locked versions if the lock file exists. Run after pulling, cloning, or editingpubspec.yaml.
flutter pub upgrade— re-resolves all dependencies to the LATEST allowed by your version constraints (within your^1.2.3ranges). Updatespubspec.lock. Use sparingly.--major-versionsrewrites the^ranges inpubspec.yamlitself 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.