Scrollbar constructor

const Scrollbar(
  1. {Key? key,
  2. required Widget child,
  3. ScrollController? controller,
  4. bool? thumbVisibility,
  5. bool? trackVisibility,
  6. double? thickness,
  7. Radius? radius,
  8. ScrollNotificationPredicate? notificationPredicate,
  9. bool? interactive,
  10. ScrollbarOrientation? scrollbarOrientation,
  11. @Deprecated('Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. ' 'This feature was deprecated after v3.4.0-19.0.pre.') bool? showTrackOnHover}
)

Creates a Material Design scrollbar that by default will connect to the closest Scrollable descendant of child.

The child should be a source of ScrollNotification notifications, typically a Scrollable widget.

If the controller is null, the default behavior is to enable scrollbar dragging using the PrimaryScrollController.

When null, thickness defaults to 8.0 pixels on desktop and web, and 4.0 pixels when on mobile platforms. A null radius will result in a default of an 8.0 pixel circular radius about the corners of the scrollbar thumb, except for when executing on TargetPlatform.android, which will render the thumb without a radius.

Implementation

const Scrollbar({
  super.key,
  required this.child,
  this.controller,
  this.thumbVisibility,
  this.trackVisibility,
  this.thickness,
  this.radius,
  this.notificationPredicate,
  this.interactive,
  this.scrollbarOrientation,
  @Deprecated(
    'Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. '
    'This feature was deprecated after v3.4.0-19.0.pre.',
  )
  this.showTrackOnHover,
});