CupertinoScrollbarTransformController constructor
CupertinoScrollbarTransformController({
- required TickerProvider vsync,
- required TransformScrollbarWidgetInterface controlInterface,
- bool? thumbVisibility,
- double? thickness = defaultThickness,
- double thicknessWhileDragging = defaultThicknessWhileDragging,
- Radius radius = defaultRadius,
- Radius radiusWhileDragging = defaultRadiusWhileDragging,
Implementation
CupertinoScrollbarTransformController({
required super.vsync,
required super.controlInterface,
bool? thumbVisibility,
super.thickness = defaultThickness,
this.thicknessWhileDragging = defaultThicknessWhileDragging,
Radius super.radius = defaultRadius,
this.radiusWhileDragging = defaultRadiusWhileDragging,
}) : assert(thickness! < double.infinity),
assert(thicknessWhileDragging < double.infinity),
_thicknessAnimationControllerV = AnimationController(
vsync: vsync,
duration: _kScrollbarResizeDuration,
),
_thicknessAnimationControllerH = AnimationController(
vsync: vsync,
duration: _kScrollbarResizeDuration,
),
super(
thumbVisibility: thumbVisibility ?? false,
fadeDuration: _kScrollbarFadeDuration,
timeToFade: _kScrollbarTimeToFade,
pressDuration: const Duration(milliseconds: 100),
) {
_thicknessAnimationControllerV.addListener(() {
updateScrollbarPainter(true);
});
_thicknessAnimationControllerH.addListener(() {
updateScrollbarPainter(false);
});
}