ScrollbarPainter constructor

ScrollbarPainter({@required Color color, @required TextDirection textDirection, @required double thickness, @required Animation<double> fadeoutOpacityAnimation, EdgeInsets padding: EdgeInsets.zero, double mainAxisMargin: 0.0, double crossAxisMargin: 0.0, Radius radius, double minLength: _kMinThumbExtent, double minOverscrollLength })

Creates a scrollbar with customizations given by construction arguments.

Implementation

ScrollbarPainter({
  @required this.color,
  @required this.textDirection,
  @required this.thickness,
  @required this.fadeoutOpacityAnimation,
  this.padding = EdgeInsets.zero,
  this.mainAxisMargin = 0.0,
  this.crossAxisMargin = 0.0,
  this.radius,
  this.minLength = _kMinThumbExtent,
  double minOverscrollLength,
}) : assert(color != null),
     assert(textDirection != null),
     assert(thickness != null),
     assert(fadeoutOpacityAnimation != null),
     assert(mainAxisMargin != null),
     assert(crossAxisMargin != null),
     assert(minLength != null),
     assert(minLength >= 0),
     assert(minOverscrollLength == null || minOverscrollLength <= minLength),
     assert(minOverscrollLength == null || minOverscrollLength >= 0),
     assert(padding != null),
     assert(padding.isNonNegative),
     minOverscrollLength = minOverscrollLength ?? minLength {
  fadeoutOpacityAnimation.addListener(notifyListeners);
}