RawScrollbar constructor Null safety

const RawScrollbar(
  1. {Key? key,
  2. required Widget child,
  3. ScrollController? controller,
  4. bool? isAlwaysShown,
  5. Radius? radius,
  6. double? thickness,
  7. Color? thumbColor,
  8. double minThumbLength,
  9. double? minOverscrollLength,
  10. Duration fadeDuration,
  11. Duration timeToFade,
  12. Duration pressDuration,
  13. ScrollNotificationPredicate notificationPredicate,
  14. bool? interactive,
  15. ScrollbarOrientation? scrollbarOrientation,
  16. double mainAxisMargin,
  17. double crossAxisMargin}
)

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.

The child, fadeDuration, pressDuration, and timeToFade arguments must not be null.

Implementation

const RawScrollbar({
  Key? key,
  required this.child,
  this.controller,
  this.isAlwaysShown,
  this.radius,
  this.thickness,
  this.thumbColor,
  this.minThumbLength = _kMinThumbExtent,
  this.minOverscrollLength,
  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
}) : assert(child != null),
     assert(minThumbLength != null),
     assert(minThumbLength >= 0),
     assert(minOverscrollLength == null || minOverscrollLength <= minThumbLength),
     assert(minOverscrollLength == null || minOverscrollLength >= 0),
     assert(fadeDuration != null),
     assert(timeToFade != null),
     assert(pressDuration != null),
     assert(mainAxisMargin != null),
     assert(crossAxisMargin != null),
     super(key: key);