getPlatformScrollbarController function

RawTransformScrollbarController getPlatformScrollbarController({
  1. required TickerProvider vsync,
  2. required TransformScrollbarWidgetInterface controlInterface,
  3. double? thickness,
  4. Radius? radius,
  5. bool? trackVisibility,
  6. bool? interactive,
  7. bool? thumbVisibility,
})

Implementation

RawTransformScrollbarController getPlatformScrollbarController({
  required TickerProvider vsync,
  required TransformScrollbarWidgetInterface controlInterface,
  double? thickness,
  Radius? radius,
  bool? trackVisibility,
  bool? interactive,
  bool? thumbVisibility,
}) {
  BuildContext context = controlInterface.getContext();
  if (Theme.of(context).platform == TargetPlatform.iOS ||
      Theme.of(context).platform == TargetPlatform.macOS) {
    return CupertinoScrollbarTransformController(
      vsync: vsync,
      controlInterface: controlInterface,
      thumbVisibility: thumbVisibility ?? false,
      thickness:
          thickness ?? CupertinoScrollbarTransformController.defaultThickness,
      thicknessWhileDragging: thickness ??
          CupertinoScrollbarTransformController.defaultThicknessWhileDragging,
      radius: radius ?? CupertinoScrollbarTransformController.defaultRadius,
      radiusWhileDragging: radius ??
          CupertinoScrollbarTransformController.defaultRadiusWhileDragging,
    );
  } else {
    return MaterialScrollbarTransformController(
      vsync: vsync,
      controlInterface: controlInterface,
      thumbVisibility: thumbVisibility,
      trackVisibility: trackVisibility,
      thickness: thickness,
      radius: radius,
      interactive: interactive,
    );
  }
}