ScrollbarPainter constructor

ScrollbarPainter({
  1. required Color color,
  2. required Animation<double> fadeoutOpacityAnimation,
  3. Color trackColor = const Color(0x00000000),
  4. Color trackBorderColor = const Color(0x00000000),
  5. TextDirection? textDirection,
  6. double thickness = _kScrollbarThickness,
  7. EdgeInsets padding = EdgeInsets.zero,
  8. double mainAxisMargin = 0.0,
  9. double crossAxisMargin = 0.0,
  10. Radius? radius,
  11. Radius? trackRadius,
  12. OutlinedBorder? shape,
  13. double minLength = _kMinThumbExtent,
  14. double? minOverscrollLength,
  15. ScrollbarOrientation? scrollbarOrientation,
  16. bool ignorePointer = false,
})

Creates a scrollbar with customizations given by construction arguments.

Implementation

ScrollbarPainter({
  required Color color,
  required this.fadeoutOpacityAnimation,
  Color trackColor = const Color(0x00000000),
  Color trackBorderColor = const Color(0x00000000),
  TextDirection? textDirection,
  double thickness = _kScrollbarThickness,
  EdgeInsets padding = EdgeInsets.zero,
  double mainAxisMargin = 0.0,
  double crossAxisMargin = 0.0,
  Radius? radius,
  Radius? trackRadius,
  OutlinedBorder? shape,
  double minLength = _kMinThumbExtent,
  double? minOverscrollLength,
  ScrollbarOrientation? scrollbarOrientation,
  bool ignorePointer = false,
}) : assert(radius == null || shape == null),
     assert(minLength >= 0),
     assert(minOverscrollLength == null || minOverscrollLength <= minLength),
     assert(minOverscrollLength == null || minOverscrollLength >= 0),
     assert(padding.isNonNegative),
     _color = color,
     _textDirection = textDirection,
     _thickness = thickness,
     _radius = radius,
     _shape = shape,
     _padding = padding,
     _mainAxisMargin = mainAxisMargin,
     _crossAxisMargin = crossAxisMargin,
     _minLength = minLength,
     _trackColor = trackColor,
     _trackBorderColor = trackBorderColor,
     _trackRadius = trackRadius,
     _scrollbarOrientation = scrollbarOrientation,
     _minOverscrollLength = minOverscrollLength ?? minLength,
     _ignorePointer = ignorePointer {
  fadeoutOpacityAnimation.addListener(notifyListeners);
}