hideVerticalScrollbar method

Widget hideVerticalScrollbar(
  1. BuildContext context, {
  2. ScrollBehavior? behavior,
})

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,
  );
}