Repository: flutter
Issue: `flutter pub upgrade` reports outdated, but `flutter pub outdated` reports nothing
Labels: tool,has reproducible steps,P2,team-tool,triaged-tool,found in release: 3.22,found in release: 3.23

### Steps to reproduce

1. `flutter upgrade`
2. Create new Flutter project
3. `flutter pub upgrade`. Notice:
> 8 packages have newer versions incompatible with dependency constraints. Try `flutter pub outdated` for more information.
4. `flutter pub outdated` Note report that 1 package (the lints package) is outdated.
5. `flutter pub upgrade --major-versions`
6. `flutter pub upgrade`. Notice repeat of "8 packages have newer versions" message
7. `flutter pub outdated` Get:

Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name  Current  Upgradable  Resolvable  Latest  

direct dependencies: all up-to-date.

dev_dependencies: all up-to-date.
all dependencies are up-to-date.


### Expected results

`flutter pub upgrade`, `flutter pub upgrade --major-versions` and `flutter pub outdated` should agree about what's going on.

### Actual results

See steps to reproduce

### Code sample

Use new project as described

### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

`flutter pub outdated --verbose` exceeds 512KB limit on pastebin.
`flutter pub upgrade --verbose` the same.

### Flutter Doctor output

[✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-arm64, locale en-AU)
    • Flutter version 3.22.1 on channel stable at /Users/gisborne/dev/bin/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (13 days ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/gisborne/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = /Users/gisborne/Library/Android/sdk
    ✗ Android SDK file not found: /Users/gisborne/Library/Android/sdk/platforms/android-33/android.jar.
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 79.1.3
    • Dart plugin version 241.17502

[✓] VS Code (version 1.89.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.27.0

[✓] Connected device (6 available)
    • Iris (mobile)                       • 00008030-001879541480802E            • ios            • iOS 17.5.1 21F90
    • Athena (mobile)                     • 00008103-0008716C216B001E            • ios            • iOS 17.5.1 21F90
    • iPhone SE (3rd generation) (mobile) • 3492AACC-3C82-4924-B5B9-81656EE116A0 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5
      (simulator)
    • macOS (desktop)                     • macos                                • darwin-arm64   • macOS 14.5 23F79 darwin-arm64
    • Mac Designed for iPad (desktop)     • mac-designed-for-ipad                • darwin         • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)                        • chrome                               • web-javascript • Google Chrome 125.0.6422.61

[✓] Network resources
    • All expected network resources are available.