Flutter two_dimensional_scrollables Web app Chrome - cannot get horizontal scroll to work?

21 views Asked by At

I have a Flutter app where I am using the two_dimensional_scrollables TableView widget to display a complex spreadsheet style display.

For the Flutter web app, running this in Chrome on Windows 10 I can't get the horizontal scroll to work. The vertical scroll works fine using the mouse wheel.

In the top level MaterialApp class, I have the the 'scrollBehaviour' property set to:

class GdScrollBehavior extends MaterialScrollBehavior {
  // Override behavior methods and getters like dragDevices
  @override
  Set<PointerDeviceKind> get dragDevices => {
    PointerDeviceKind.touch,
    PointerDeviceKind.mouse,
    // etc.
  };
}

I suspect that this problem is something to do with setting up a Gesture behaviour in TableView to have a horizontal drag recognized as a 'scroll horizontally' instruction, but the widget docs are not too clear on how to set this up.

Any suggestions?

1

There are 1 answers

0
user2868835 On

Found the answer...

For a Flutter web app, the horizontal scrolling is activated by holding down the shift key whilst using the mouse wheel.