-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Pre-history:
This is one of the issues:
#45893
#45896
#45897
which have been found on the way to make ListView in Flutter for web scrollable with a finger on touch screen, alternative for this is scrolling a list with a mouse pointer.
Steps to Reproduce
- Create a new Flutter project
- Copy content of the gist https://gist.github.com/mikepyts/7b63b8e5086d4606c0d25631d27d5755 to the main.dart.
- Copy content of the gist https://gist.github.com/mikepyts/666961b23a7120cd45f3d6b3894caaf6 to the separate custom_scrollbar.dart
- Copy content of the gist https://gist.github.com/mikepyts/195263ee630b1add69d2f53af3fb9e0a to the separate custom_scollable.dart
- Copy content of the gist https://gist.github.com/mikepyts/54dcb4c3cb1ea3b5aacfe92f83e25a60 to the separate custom_scrollview.dart
- Uncomment issue number 3.3
- Correct import issues
- Run the project
- Observe the behavior needed to achieve scrolling of any scrollable from ScrollView.dart with a single finger (pan) or with a mouse pointer.
Expected results
Out of the box, Scrollable can be scrolled with a touchbar or mouse wheel, but it is hard to provide precise scrolling for touch screens on the web platform with a single finger or mouse pointer. To make it work I have copied SDK source code content to the separate files and changed:
https://drive.google.com/open?id=1P98RCvqaisxLYqt5oQ53dZTAxaESQsYe
- In ScrollView - use own Scrollable implementation for scrollable property inside the build method:

- In Scrollable have added Scale gesture callbacks to the RawGestureRecognizer factories:

Actual results
Scrollable can not be scrolled with a single finger or mouse pointer
Target Platform: Web
Target OS version/browser: MacOS Catalina, Chrome
Flutter doctor
[✓] Flutter (Channel master, v1.12.16-pre.35, on Mac OS X 10.15.1 19B88, locale en-UA)
• Flutter version 1.12.16-pre.35 at /Users/mike/Documents/flutter_master
• Framework revision b9a56b9f48 (2 days ago), 2019-11-29 20:40:44 -0500
• Engine revision 8672e79af8
• Dart version 2.7.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (2 available)
• Chrome • chrome • web-javascript • Google Chrome 78.0.3904.108
• Web Server • web-server • web-javascript • Flutter Tools