RawScrollbar constructor
- Key? key,
- required Widget child,
- ScrollController? controller,
- bool? thumbVisibility,
- OutlinedBorder? shape,
- Radius? radius,
- double? thickness,
- Color? thumbColor,
- double minThumbLength = _kMinThumbExtent,
- double? minOverscrollLength,
- bool? trackVisibility,
- Radius? trackRadius,
- Color? trackColor,
- Color? trackBorderColor,
- Duration fadeDuration = _kScrollbarFadeDuration,
- Duration timeToFade = _kScrollbarTimeToFade,
- Duration pressDuration = Duration.zero,
- ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
- bool? interactive,
- ScrollbarOrientation? scrollbarOrientation,
- double mainAxisMargin = 0.0,
- double crossAxisMargin = 0.0,
- EdgeInsets? padding,
Creates a basic raw scrollbar that wraps the given child.
The child, or a descendant of the child, should be a source of ScrollNotification notifications, typically a Scrollable widget.
Implementation
const RawScrollbar({
super.key,
required this.child,
this.controller,
this.thumbVisibility,
this.shape,
this.radius,
this.thickness,
this.thumbColor,
this.minThumbLength = _kMinThumbExtent,
this.minOverscrollLength,
this.trackVisibility,
this.trackRadius,
this.trackColor,
this.trackBorderColor,
this.fadeDuration = _kScrollbarFadeDuration,
this.timeToFade = _kScrollbarTimeToFade,
this.pressDuration = Duration.zero,
this.notificationPredicate = defaultScrollNotificationPredicate,
this.interactive,
this.scrollbarOrientation,
this.mainAxisMargin = 0.0,
this.crossAxisMargin = 0.0,
this.padding,
}) : assert(
!(thumbVisibility == false && (trackVisibility ?? false)),
'A scrollbar track cannot be drawn without a scrollbar thumb.',
),
assert(minThumbLength >= 0),
assert(minOverscrollLength == null || minOverscrollLength <= minThumbLength),
assert(minOverscrollLength == null || minOverscrollLength >= 0),
assert(radius == null || shape == null);