ScrollbarModifier constructor

const ScrollbarModifier({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. ScrollController? controller,
  5. bool? thumbVisibility,
  6. bool? trackVisibility,
  7. double? thickness,
  8. Radius? radius,
  9. ScrollNotificationPredicate? notificationPredicate,
  10. bool? interactive,
  11. ScrollbarOrientation? scrollbarOrientation,
  12. @Deprecated('Use thumbVisibility instead. ' 'This feature was deprecated after v2.9.0-1.0.pre.') bool? isAlwaysShown,
  13. @Deprecated('Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. ' 'This feature was deprecated after v2.9.0-1.0.pre.') bool? showTrackOnHover,
  14. @Deprecated('Use ScrollbarThemeData.thickness to resolve based on the current state instead. ' 'This feature was deprecated after v2.9.0-1.0.pre.') double? hoverThickness,
})

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 ScrollbarModifier({
  super.key,
  super.child,
  super.modifierKey,
  this.controller,
  this.thumbVisibility,
  this.trackVisibility,
  this.thickness,
  this.radius,
  this.notificationPredicate,
  this.interactive,
  this.scrollbarOrientation,
  @Deprecated(
    'Use thumbVisibility instead. '
    'This feature was deprecated after v2.9.0-1.0.pre.',
  )
      this.isAlwaysShown,
  @Deprecated(
    'Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. '
    'This feature was deprecated after v2.9.0-1.0.pre.',
  )
      this.showTrackOnHover,
  @Deprecated(
    'Use ScrollbarThemeData.thickness to resolve based on the current state instead. '
    'This feature was deprecated after v2.9.0-1.0.pre.',
  )
      this.hoverThickness,
});