ScrollbarPainter constructor
- required Color color,
- required Animation<
double> 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,
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);
}