hideVerticalScrollbar method
Use ScrollConfiguration as wrapper to hide vertical scrollbar.
Implementation
Widget hideVerticalScrollbar(
BuildContext context, {
ScrollBehavior? behavior,
}) {
behavior ??= ScrollConfiguration.of(context);
var showScrollbar = scrollDirection != Axis.vertical;
return ScrollConfiguration(
behavior: behavior.copyWith(scrollbars: showScrollbar),
child: this,
);
}