With your own ScrollBehavior, you can apply it app-wide by setting
MaterialApp.scrollBehavior or CupertinoApp.scrollBehavior.
      Or, if you wish to only apply it to specific widgets, add a
ScrollConfiguration above the widget in question with your
custom ScrollBehavior.

Your scrollable widgets then inherits this and reflects this behavior.

Instead of creating your own ScrollBehavior, another option for changing
the default behavior is to copy the existing ScrollBehavior, and toggle the
desired feature.

    
      Create a ScrollConfiguration in your widget tree, and provide a modified copy
of the existing ScrollBehavior in the current context using copyWith.

Migration guide

Removing manual Scrollbars on desktop

Code before migration:

final

ScrollController

controller

ScrollController

();

Scrollbar

controller:

controller

child: