Remove the scroll bar itself from the flutter

42 Views Asked by At

If you scroll through physics: const Never Scrollable ScrollPhysics() in SingleChildScrollView from the plutter, you will not be able to scroll, but if you bring the mouse to the right of the Container, a scroll bar will appear.

It's not a problem when using ios and android, but when using windows app, moving the mouse will cause a scrollbar to appear and it's uncomfortable.

I know it has the ability to block scrolling in the flutter, but how do I keep the scrollbar from appearing? I searched Google hard, but I couldn't find it.

I'd be so grateful if someone could help me.

Thank you.

1

There are 1 best solutions below

0
Cabdirashiid On BEST ANSWER

Try ScrollbarTheme interactivity

Set it to false

Setting it at the theme:

MaterialApp(
  theme: ThemeData(
    scrollbarTheme: ScrollbarThemeData(interactive: false),
  ),
);

Setting it above the widget

ScrollbarTheme(
     data: ScrollbarThemeData(interactive: false),
     child: SingleChildScrollView(),
);