Repository: flutter
Issue: ScrollPosition.isScrollingNotifier gives incorrect values on web
Labels: waiting for customer response,framework,f: scrolling,platform-web,has reproducible steps,team-framework,found in release: 3.27,found in release: 3.28

Using a desktop browser, go to [this official example for isScrollingNotifier in the Flutter docs](https://api.flutter.dev/flutter/widgets/ScrollPosition-class.html#widgets.ScrollPosition.2).

The example incorrectly shows that it is not scrolling when it is scrolling. Printing the value of `isScrollingNotifier` on line 19 shows that it rapidly alternates between `true` and `false` during a scroll. Tested using both Safari and Chrome on MacOS 15.

However, it seems to work properly when using an iOS browser.

Alternatively, run this minimal example on the web. The example works as expected when compiled for iOS and on an iOS browser.

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  late final ScrollController _controller;

  void _checkIsScrolling() {
    print(_controller.position.isScrollingNotifier.value);
  }

  @override
  void initState() {
    super.initState();
    _controller = ScrollController(
      onAttach: (position) =>
          position.isScrollingNotifier.addListener(_checkIsScrolling),
      onDetach: (position) =>
          position.isScrollingNotifier.removeListener(_checkIsScrolling),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ListView.builder(
        controller: _controller,
        itemBuilder: (_, ndx) => ListTile(title: Text("Item $ndx")),
      ),
    );
  }
}
```

</details>

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.24.5, on macOS 15.2 24C101 darwin-x64, locale en-US)
    • Flutter version 3.24.5 on channel stable at /Users/benjaminweschler/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dec2ee5c1f (6 weeks ago), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/benjaminweschler/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • 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 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.3.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 83.0.4
    • Dart plugin version 243.23177

[✓] Connected device (3 available)
    • iPhone 16 Pro (mobile) • A07624C4-AE5C-4820-9AC7-1D6522020281 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-1 (simulator)
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 131.0.6778.205

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>