CupertinoScrollbarTransformController constructor

CupertinoScrollbarTransformController({
  1. required TickerProvider vsync,
  2. required TransformScrollbarWidgetInterface controlInterface,
  3. bool? thumbVisibility,
  4. double? thickness = defaultThickness,
  5. double thicknessWhileDragging = defaultThicknessWhileDragging,
  6. Radius radius = defaultRadius,
  7. 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);
  });
}