Why flutter pub upgrade
didn’t work?
flutter pub upgrade
only upgrades to the highest versions allowed by your current constraints. If one of your direct dependencies is depending on an older version of a transitive dependency, then pub upgrade will not override that.
1. Get the dependency tree to see who depends on what
flutter pub deps
2. Update Flutter itself (for SDK‑bundled packages)
Updates Flutter and the SDK packages (like meta, vector_math, etc.) that are bundled with Flutter.
This may solve some outdated transitive dependencies like meta or vector_math.
flutter upgrade
3. Upgrade all dependencies within your current constraints
flutter pub upgrade
4. Aggressively bump to latest (ignores upper‑bounds)
flutter pub upgrade --major-versions