Skip to content

[Flutter Web] NotificationListener ScrollNotification is bugged with SingleChildScrollView (All possible ScrollNotifications registering on each frame) #44732

Closed

Description

@khari998

I am trying to track the ScrollNotification within a SingleChildScrollView in order to implement some behavior when reaching the bottom of the widget and for some reason I am getting all possible ScrollNotification states on every frame.

This is the structure of the application.

Scaffold(
          body: NotificationListener(
            onNotification: (scrollNotification) {
              print(scrollNotification); // Error can be noticed with this line
              return true; // needed to return bool. does not change result
            },
            child: SingleChildScrollView(
              child: Column(
                children: 
                    [
                      // widgets
                    ],
              ),
            ),
          ),
        ),

On the first line of the function that is located at the onNotification property, I am printing out the scroll notification in order to track when the SingleChildScrollView updates and when it reaches the bottom of the widget when scrolling.

Instead of printing one ScrollEndNotification when reaching the bottom of the SingleChildScrollView, what happens instead is that all possible states of the ScrollNotification are printed on each frame.

This is what logs to the console:

ScrollStartNotification(depth: 2 (remote), FixedScrollMetrics(0.8..[337.6]..0.0))
ScrollUpdateNotification(depth: 2 (remote), FixedScrollMetrics(0.8..[337.6]..0.0), scrollDelta: 0.8181512605042371)
ScrollEndNotification(depth: 2 (remote), FixedScrollMetrics(0.8..[337.6]..0.0))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(204.0..[998.0]..761.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(204.0..[998.0]..761.4), scrollDelta: 119)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(204.0..[998.0]..761.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(223.0..[998.0]..742.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(223.0..[998.0]..742.4), scrollDelta: 19)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(223.0..[998.0]..742.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(323.0..[998.0]..642.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(323.0..[998.0]..642.4), scrollDelta: 100)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(323.0..[998.0]..642.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(351.0..[998.0]..614.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(351.0..[998.0]..614.4), scrollDelta: 28)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(351.0..[998.0]..614.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(397.0..[998.0]..568.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(397.0..[998.0]..568.4), scrollDelta: 46)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(397.0..[998.0]..568.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(414.0..[998.0]..551.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(414.0..[998.0]..551.4), scrollDelta: 17)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(414.0..[998.0]..551.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(429.0..[998.0]..536.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(429.0..[998.0]..536.4), scrollDelta: 15)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(429.0..[998.0]..536.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(448.0..[998.0]..517.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(448.0..[998.0]..517.4), scrollDelta: 19)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(448.0..[998.0]..517.4))
ScrollStartNotification(depth: 2 (remote), FixedScrollMetrics(0.8..[337.6]..0.0))
ScrollUpdateNotification(depth: 2 (remote), FixedScrollMetrics(0.8..[337.6]..0.0), scrollDelta: 0.8181512605042371)
ScrollEndNotification(depth: 2 (remote), FixedScrollMetrics(0.8..[337.6]..0.0))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(474.0..[998.0]..491.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(474.0..[998.0]..491.4), scrollDelta: 26)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(474.0..[998.0]..491.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(480.0..[998.0]..485.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(480.0..[998.0]..485.4), scrollDelta: 6)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(480.0..[998.0]..485.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(488.0..[998.0]..477.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(488.0..[998.0]..477.4), scrollDelta: 8)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(488.0..[998.0]..477.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(489.0..[998.0]..476.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(489.0..[998.0]..476.4), scrollDelta: 1)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(489.0..[998.0]..476.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(502.0..[998.0]..463.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(502.0..[998.0]..463.4), scrollDelta: 13)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(502.0..[998.0]..463.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(511.0..[998.0]..454.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(511.0..[998.0]..454.4), scrollDelta: 9)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(511.0..[998.0]..454.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(545.0..[998.0]..420.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(545.0..[998.0]..420.4), scrollDelta: 34)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(545.0..[998.0]..420.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(586.0..[998.0]..379.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(586.0..[998.0]..379.4), scrollDelta: 41)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(586.0..[998.0]..379.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(630.0..[998.0]..335.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(630.0..[998.0]..335.4), scrollDelta: 44)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(630.0..[998.0]..335.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(650.0..[998.0]..315.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(650.0..[998.0]..315.4), scrollDelta: 20)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(650.0..[998.0]..315.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(686.0..[998.0]..279.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(686.0..[998.0]..279.4), scrollDelta: 36)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(686.0..[998.0]..279.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(793.0..[998.0]..172.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(793.0..[998.0]..172.4), scrollDelta: 107)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(793.0..[998.0]..172.4))
ScrollStartNotification(depth: 2 (remote), FixedScrollMetrics(0.8..[337.6]..0.0))
ScrollUpdateNotification(depth: 2 (remote), FixedScrollMetrics(0.8..[337.6]..0.0), scrollDelta: 0.8181512605042371)
ScrollEndNotification(depth: 2 (remote), FixedScrollMetrics(0.8..[337.6]..0.0))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(957.0..[998.0]..8.4))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(957.0..[998.0]..8.4), scrollDelta: 164)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(957.0..[998.0]..8.4))
ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(965.4..[998.0]..0.0))
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(965.4..[998.0]..0.0), scrollDelta: 8.365546218487225)
ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(965.4..[998.0]..0.0))

Instead I should be seeing something like this when at the beginning of the widget:

ScrollStartNotification(depth: 0 (local), FixedScrollMetrics(// misc)

followed by this when scrolling:

ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(// misc)
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(// misc)
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(// misc)
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(// misc)
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(// misc)
ScrollUpdateNotification(depth: 0 (local), FixedScrollMetrics(// misc)
...

followed by this when the bottom is reached:

ScrollEndNotification(depth: 0 (local), FixedScrollMetrics(//)

This widget tree is also within a stateful widget and I am currently experiencing this when using Flutter Web.

Activity

  1. changed the title [-]NotificationListener scrollNotification is bugged with SingleChildScrollView[/-] [+]NotificationListener ScrollNotification is bugged with SingleChildScrollView (All possible ScrollNotifications displaying on each frame)[/+] on Nov 12, 2019
  2. khari998 commented on Nov 12, 2019

    @khari998
    Author

    Here is a sample app for you to test and confirm this bug.

    Steps to reproduce

    1. run the command flutter run -d chrome
    2. scroll through the list rendered in the app
    3. check the console to see all states of the scroll notification printed at each frame
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      // This widget is the root of your application.
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: MyHomePage(
              title: 'See console for scrolling bug after scrolling the list'),
        );
      }
    }
    
    class MyHomePage extends StatefulWidget {
      MyHomePage({Key key, this.title}) : super(key: key);
    
      final String title;
    
      @override
      _MyHomePageState createState() => _MyHomePageState();
    }
    
    class _MyHomePageState extends State<MyHomePage> {
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            title: Text(widget.title),
          ),
          body: NotificationListener(
            onNotification: (scrollNotification) {
              print(scrollNotification); // prints all scroll Notification states for each frame
              return false; // result is the same regardless of whether this is true, false or null
            },
            child: SingleChildScrollView(
              child: Column(
                children: List.filled(30, null)
                    .map(
                      (elem) => Container(
                        margin: EdgeInsets.all(20),
                        height: 100,
                        decoration: BoxDecoration(
                          border: Border.all(color: Colors.red, width: 1.5),
                          borderRadius:
                              const BorderRadius.all(Radius.circular(4.0)),
                        ),
                        child: Center(
                          child: Text('Hello'),
                        ),
                      ),
                    )
                    .toList(),
              ),
            ),
          ),
        );
      }
    }
  3. changed the title [-]NotificationListener ScrollNotification is bugged with SingleChildScrollView (All possible ScrollNotifications displaying on each frame)[/-] [+]NotificationListener ScrollNotification is bugged with SingleChildScrollView (All possible ScrollNotifications registering on each frame)[/+] on Nov 12, 2019
  4. iapicca commented on Nov 14, 2019

    @iapicca

    Hi @khari998
    could you please provide your updated flutter doctor -v?
    Thank you

  5. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    frameworkflutter/packages/flutter repository. See also f: labels.
    and removed
    d: stackoverflowGood question for Stack Overflow
    on Nov 14, 2019
  6. khari998 commented on Nov 14, 2019

    @khari998
    Author
    flutter doctor -v
    [✓] Flutter (Channel master, v1.11.1-pre.49, on Mac OS X 10.15.1 19B88, locale en-US)
        • Flutter version 1.11.1-pre.49 at /Users/Khari/Documents/Dev_Projects/flutter
        • Framework revision c90d64b619 (6 hours ago), 2019-11-14 01:16:17 -0500
        • Engine revision 7c2a4ec97f
        • Dart version 2.7.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
        • Android SDK at /Users/Khari/Library/Android/sdk
        • Android NDK location not configured (optional; useful for native profiling support)
        • Platform android-29, build-tools 29.0.1
        • ANDROID_HOME = /Users/Khari/Library/Android/sdk
        • ANDROID_SDK_ROOT = /Users/Khari/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.2.1, Build version 11B500
        • CocoaPods version 1.8.4
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 3.4)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 37.1.1
        • Dart plugin version 183.6270
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    
    [✓] VS Code (version 1.40.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.6.0
    
    [✓] Connected device (2 available)
        • Chrome     • chrome     • web-javascript • Google Chrome 78.0.3904.97
        • Web Server • web-server • web-javascript • Flutter Tools
    
    flutter run --verbose
    [  +28 ms] executing: [/Users/Khari/Documents/Dev_Projects/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
    [  +38 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
    [        ] c90d64b619d674bdca955b94058db01906781819
    [        ] executing: [/Users/Khari/Documents/Dev_Projects/flutter/] git describe --match v*.*.* --first-parent --long --tags
    [  +25 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
    [        ] v1.11.0-49-gc90d64b61
    [   +8 ms] executing: [/Users/Khari/Documents/Dev_Projects/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
    [   +6 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [        ] origin/master
    [        ] executing: [/Users/Khari/Documents/Dev_Projects/flutter/] git ls-remote --get-url origin
    [   +5 ms] Exit code 0 from: git ls-remote --get-url origin
    [        ] https://github.com/flutter/flutter.git
    [  +51 ms] executing: [/Users/Khari/Documents/Dev_Projects/flutter/] git rev-parse --abbrev-ref HEAD
    [   +6 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [        ] master
    [  +10 ms] executing: sw_vers -productName
    [  +15 ms] Exit code 0 from: sw_vers -productName
    [        ] Mac OS X
    [        ] executing: sw_vers -productVersion
    [  +14 ms] Exit code 0 from: sw_vers -productVersion
    [        ] 10.15.1
    [        ] executing: sw_vers -buildVersion
    [  +15 ms] Exit code 0 from: sw_vers -buildVersion
    [        ] 19B88
    [  +28 ms] executing: /usr/bin/xcode-select --print-path
    [   +7 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
    [        ] /Applications/Xcode.app/Contents/Developer
    [   +1 ms] executing: /usr/bin/xcodebuild -version
    [ +116 ms] Exit code 0 from: /usr/bin/xcodebuild -version
    [   +3 ms] Xcode 11.2.1
               Build version 11B500
    [  +66 ms] executing: /Users/Khari/Library/Android/sdk/platform-tools/adb devices -l
    [   +6 ms] Exit code 0 from: /Users/Khari/Library/Android/sdk/platform-tools/adb devices -l
    [        ] List of devices attached
    [  +17 ms] executing: /Users/Khari/Documents/Dev_Projects/flutter/bin/cache/artifacts/libimobiledevice/idevice_id -h
    [  +71 ms] /usr/bin/xcrun simctl list --json devices
    [ +141 ms] More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices.
    [ +314 ms] Chrome     • chrome     • web-javascript • Google Chrome 78.0.3904.97
    [   +1 ms] Web Server • web-server • web-javascript • Flutter Tools
    [  +14 ms] "flutter run" took 852ms.
    
    #0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
    #1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:289:7)
    <asynchronous suspension>
    #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:582:11)
    <asynchronous suspension>
    #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:507:33)
    <asynchronous suspension>
    #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
    <asynchronous suspension>
    #5      _rootRun (dart:async/zone.dart:1124:13)
    #6      _CustomZone.run (dart:async/zone.dart:1021:19)
    #7      _runZoned (dart:async/zone.dart:1516:10)
    #8      runZoned (dart:async/zone.dart:1463:12)
    #9      AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
    <asynchronous suspension>
    #10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:497:20)
    #11     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
    <asynchronous suspension>
    #12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:416:21)
    <asynchronous suspension>
    #13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
    <asynchronous suspension>
    #14     _rootRun (dart:async/zone.dart:1124:13)
    #15     _CustomZone.run (dart:async/zone.dart:1021:19)
    #16     _runZoned (dart:async/zone.dart:1516:10)
    #17     runZoned (dart:async/zone.dart:1463:12)
    #18     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
    <asynchronous suspension>
    #19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:367:19)
    <asynchronous suspension>
    #20     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
    #21     new Future.sync (dart:async/future.dart:222:31)
    #22     CommandRunner.run (package:args/command_runner.dart:112:14)
    #23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:251:18)
    #24     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
    <asynchronous suspension>
    #25     _rootRun (dart:async/zone.dart:1124:13)
    #26     _CustomZone.run (dart:async/zone.dart:1021:19)
    #27     _runZoned (dart:async/zone.dart:1516:10)
    #28     runZoned (dart:async/zone.dart:1500:12)
    #29     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
    <asynchronous suspension>
    #30     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
    <asynchronous suspension>
    #31     _rootRun (dart:async/zone.dart:1124:13)
    #32     _CustomZone.run (dart:async/zone.dart:1021:19)
    #33     _runZoned (dart:async/zone.dart:1516:10)
    #34     runZoned (dart:async/zone.dart:1463:12)
    #35     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
    <asynchronous suspension>
    #36     runInContext (package:flutter_tools/src/context_runner.dart:65:24)
    <asynchronous suspension>
    #37     run (package:flutter_tools/runner.dart:50:10)
    #38     main (package:flutter_tools/executable.dart:65:9)
    <asynchronous suspension>
    #39     main (file:///Users/Khari/Documents/Dev_Projects/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
    #40     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
    #41     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
    
  7. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 14, 2019
  8. khari998 commented on Nov 19, 2019

    @khari998
    Author

    Has anyone been able to replicate this with the sample app provided?

  9. iapicca commented on Nov 21, 2019

    @iapicca

    Hi @khari998
    does this code represent the issue you are describing?

    code
    import 'package:flutter/material.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) => MaterialApp(
        home: MyHomePage(),
      ); 
    }
    
    class MyHomePage extends StatefulWidget {
      @override
      _MyHomePageState createState() => _MyHomePageState();
    }
    
    class _MyHomePageState extends State<MyHomePage> {
    
      static bool _onStartScroll(ScrollNotification notification) {
        print(notification.metrics.viewportDimension.toString(),);
        return true;
      }
      
      @override
      Widget build(BuildContext context) => Scaffold(
        body: NotificationListener<ScrollNotification>(
          onNotification: (ScrollNotification notification) => _onStartScroll(notification),
          child: SingleChildScrollView(
            child:  Column(
              children: List.filled(30, null)
                .map((_) => Container(
                  margin: EdgeInsets.all(20),
                  height: 100,
                  decoration: BoxDecoration(
                    border: Border.all(color: Colors.red, width: 1.5),
                    borderRadius:
                    const BorderRadius.all(Radius.circular(4.0)),
                  ),
                  child: Center(
                    child: Text('Hello'),
                  ),
              ),).toList(),
      ),),),);
    }
    

    Thank you

  10. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 22, 2019
  11. 58 remaining items

  12. khari998 commented on Sep 5, 2021

    @khari998
    Author

    Hey @khari998 I am catching up on the history of this issue... can you confirm that the scrolling you are doing is a mouse scroll action?

    It was a mouse scroll action. So this is intended behavior?

    Also, I noticed this comment earlier

    So ScrollEndNotification should only occur when reaching the bottom of the list.

    This is not necessarily true, a ScrollEndNotification does not represent the end of the list, it represents the end of the scrolling action. For mouse scrolling, scroll action is handled and ended constantly since we do not know if the user will scroll more. On mobile devices, we have contact with the device that help us distinguish a definitive start and end to the motion.

    Could you instead check the ScrollMetrics of the notification you are receiving to validate if you are at the end of the list? The metrics should provide you with the current position (notification.metrics.pixels) and the position at the end of the list (notification.metrics.maxScrollExtent). I think this is working as expected, but please let me know if this resolves your issue.

    I will try this thank you.

  13. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 5, 2021
  14. Piinks commented on Sep 7, 2021

    @Piinks
    Contributor

    It was a mouse scroll action. So this is intended behavior?

    Yes, I believe so, but please do let me know how that works for you. :)

  15. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 7, 2021
  16. andynvt commented on Sep 23, 2021

    @andynvt

    I don't know this is correct or not.
    I got the same issue with macOS/iOS on Flutter beta 2.5.0. Then I updated Flutter beta 2.6.0 - Flutter stable 2.5.1. It didn't work.
    I keep checkout to Flutter 2.2.3. It was the same.
    But after I checkout back to Flutter stable 2.5.1, then Flutter beta 2.6.0. It works!

    You guys can try your luck 😄

    Edit: I got error in: CustomScrollView, ListView and even SingleChildScrollView

  17. danagbemava-nc commented on Nov 3, 2021

    @danagbemava-nc
    Member

    I will try this thank you.

    @khari998 did trying this comment work out for you?

  18. github-actions commented on Nov 3, 2021

    @github-actions

    Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
    If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
    Thanks for your contribution.

  19. added
    r: timeoutIssue is closed due to author not providing the requested details in time
    and removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 3, 2021
  20. github-actions commented on Nov 17, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  21. locked as resolved and limited conversation to collaborators on Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktopa: mouseIssues related to using a mouse or mouse supportd: api docsIssues with https://api.flutter.dev/d: stackoverflowGood question for Stack Overflowf: scrollingViewports, list views, slivers, etc.found in release: 2.2Found to occur in 2.2found in release: 2.5Found to occur in 2.5frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: timeoutIssue is closed due to author not providing the requested details in time

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions