Repository: flutter
Issue: The `ScrollNotification` parameter type used in the notification callback of `ScrollNotificationObserver` is confusing
Labels: framework,f: scrolling,a: quality,P2,team-framework,triaged-framework

![10BBBD76-2386-45E0-8637-0F1DE2400F32](https://github.com/flutter/flutter/assets/26625149/2c5b0c02-289c-4da4-84d6-ed55b64c0e55)


Although we have specified the type of `ScrollNotification` as `ScrollUpdateNotification` in the code, it is surprising that `_ConvertedScrollMetricsNotification` appears.


```dart
class __ScrollListenerWidgetState extends State<_ScrollListenerWidget> {
  void _listener(ScrollNotification notification) {
    // Here we limit the `ScrollNotification` type to `ScrollUpdateNotification`.
    if (notification is ScrollUpdateNotification) {
      if (kDebugMode) {
        print('xlog, $this, $notification');
      }
    }
  }

...
}
```

**[Here](https://github.com/0xZOne/scroll_notification_demo/blob/0a75b96b0beeb4fca564282e22593e70a82791a9/lib/main.dart) is the complete demo code.**




<details><summary>Logs</summary>

```console
Multiple devices found:
PDBM00 (mobile)         • BYPRYPBMTG69G6HY          • android-arm64  • Android 9 (API 28)
艾尔玛的iPhone (2) (mobile) • 00008110-001635A42183801E • ios            • iOS 16.0 20A362
macOS (desktop)         • macos                     • darwin-x64     • macOS 13.1 22C65 darwin-x64
Chrome (web)            • chrome                    • web-javascript • Google Chrome 113.0.5672.92
[1]: PDBM00 (BYPRYPBMTG69G6HY)
[2]: 艾尔玛的iPhone (2) (00008110-001635A42183801E)
[3]: macOS (macos)
[4]: Chrome (chrome)
Please choose one (To quit, press "q/Q"): 1
Launching lib/main.dart on PDBM00 in debug mode...
Running Gradle task 'assembleDebug'...                              6.8s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app-debug.apk...          27.7s
Syncing files to device PDBM00...                                   76ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

💪 Running with sound null safety 💪

An Observatory debugger and profiler on PDBM00 is available at: http://127.0.0.1:62913/Xgnuai0pykY=/
I/tification_dem(16274): ProcessProfilingInfo new_methods=1168 is saved saved_to_disk=1 resolve_classes_delay=5000
I/tification_dem(16274): Compiler allocated 4MB to compile void android.view.ViewRootImpl.performTraversals()
I/flutter (16274): xlog, __ScrollListenerWidgetState#4dbab, _ConvertedScrollMetricsNotification(depth: 0 (local), FixedScrollMetrics(0.0..[672.0]..31728.0), scrollDelta: null)
I/flutter (16274): xlog, __ScrollListenerWidgetState#423cb, _ConvertedScrollMetricsNotification(depth: 0 (local), FixedScrollMetrics(0.0..[672.0]..31728.0), scrollDelta: null)
I/flutter (16274): xlog, __ScrollListenerWidgetState#63a43, _ConvertedScrollMetricsNotification(depth: 0 (local), FixedScrollMetrics(0.0..[672.0]..31728.0), scrollDelta: null)
The Flutter DevTools debugger and profiler on PDBM00 is available at: http://127.0.0.1:9108?uri=http://127.0.0.1:62913/Xgnuai0pykY=/
W/Choreographer(16274): Frame time is 8.324866 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.
E/IMGSRV  (16274): :0: ObtainWindowParams: *piMaxBufCount is 64
E/IMGSRV  (16274): :0: ObtainWindowParams: *piMaxBufCount is 64
W/Choreographer(16274): Frame time is 0.182914 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.
D/Surface (16274): Surface::disconnect(this=0x741768a000,api=1)
D/Surface (16274): Surface::disconnect(this=0x741768a000,api=-1)
D/SurfaceControl(16274): SurfaceControl::destroy [2] this:0x74175481a0 mClient:0x74175481b0 mHandle:0x74175481b8
D/SurfaceControl(16274): SurfaceControl::destroy [1] this:0x74175481a0 mClient:0x74175481b0 mHandle:0x74175481b8
D/SurfaceControl(16274): SurfaceControl::destroy [2] this:0x7417548200 mClient:0x7417548210 mHandle:0x7417548218
D/SurfaceControl(16274): SurfaceControl::destroy [1] this:0x7417548200 mClient:0x7417548210 mHandle:0x7417548218
I/Choreographer(16274): Skipped 3 frames!  The application may be doing too much work on its main thread.
Application finished.
```

</details>



<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.7.12, on macOS 13.1 22C65 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.7.12 on channel stable at /Users/zero/fvm/versions/3.7.12
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (3 weeks ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/zero/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_SDK_ROOT = /Users/zero/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.76.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.62.0

[✓] Connected device (4 available)
    • PDBM00 (mobile)         • BYPRYPBMTG69G6HY          • android-arm64  • Android 9 (API 28)
    • 艾尔玛的iPhone (2) (mobile) • 00008110-001635A42183801E • ios            • iOS 16.0 20A362
    • macOS (desktop)         • macos                     • darwin-x64     • macOS 13.1 22C65 darwin-x64
    • Chrome (web)            • chrome                    • web-javascript • Google Chrome 113.0.5672.92

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>