Skip to content

[web] Add draggable Scrollbar with behavior similar to the CupertinoScrollBar #45897

@mikepyts

Description

@mikepyts

Pre-history:
This is one of the issues:
#45893
#45896
#45898
//place for the 2 feature request (in process)
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

  1. Create a new Flutter project
  2. Copy content of the gist https://gist.github.com/mikepyts/7b63b8e5086d4606c0d25631d27d5755 to the main.dart.
  3. Copy content of the gist https://gist.github.com/mikepyts/666961b23a7120cd45f3d6b3894caaf6 to the separate custom_scrollbar.dart file
  4. Uncomment issue number 3.1
  5. Correct import issues
  6. Run the project
  7. Observe the behavior of the current out of the box Scrollbar
  8. Uncomment issue number 3.2
  9. Correct import issues
  10. Run the project
  11. Observe the behavior with the use of the CupertinoScrollbar on the Web platform

Expected results
The scrollbar can be dragged with a mouse pointer or with a single finger on the touch screens, to make it work I have copied the content of the CupertinoScorllbar to the separate file and use it instead of default AppBar:
https://drive.google.com/open?id=1bJYJtS4ZOADmRikmCmaztnpjabakcvem
image

Actual results
Scrollbar displays position of the ListView Viewport but is not draggable
https://drive.google.com/open?id=1_Dq_3b3iWwMvge1WXq-wS3Li9B_UXJH2
image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions