CupertinoScrollbar constructor

const CupertinoScrollbar({
  1. Key? key,
  2. required Widget child,
  3. ScrollController? controller,
  4. bool? thumbVisibility,
  5. double thickness = defaultThickness,
  6. double thicknessWhileDragging = defaultThicknessWhileDragging,
  7. Radius radius = defaultRadius,
  8. Radius radiusWhileDragging = defaultRadiusWhileDragging,
  9. ScrollNotificationPredicate? notificationPredicate,
  10. ScrollbarOrientation? scrollbarOrientation,
  11. double mainAxisMargin = _kScrollbarMainAxisMargin,
})

Creates an iOS style scrollbar that wraps the given child.

The child should be a source of ScrollNotification notifications, typically a Scrollable widget.

Implementation

const CupertinoScrollbar({
  super.key,
  required super.child,
  super.controller,
  bool? thumbVisibility,
  double super.thickness = defaultThickness,
  this.thicknessWhileDragging = defaultThicknessWhileDragging,
  Radius super.radius = defaultRadius,
  this.radiusWhileDragging = defaultRadiusWhileDragging,
  ScrollNotificationPredicate? notificationPredicate,
  super.scrollbarOrientation,
  super.mainAxisMargin = _kScrollbarMainAxisMargin,
}) : assert(thickness < double.infinity),
     assert(thicknessWhileDragging < double.infinity),
     super(
       thumbVisibility: thumbVisibility ?? false,
       fadeDuration: _kScrollbarFadeDuration,
       timeToFade: _kScrollbarTimeToFade,
       pressDuration: const Duration(milliseconds: 100),
       notificationPredicate: notificationPredicate ?? defaultScrollNotificationPredicate,
     );