CScrollbar constructor

const CScrollbar({
  1. Key? key,
  2. required Widget child,
  3. ScrollController? controller,
  4. bool isAlwaysShown = false,
  5. double thickness = defaultThickness,
  6. double thicknessWhileDragging = defaultThicknessWhileDragging,
  7. Radius radius = defaultRadius,
  8. Radius radiusWhileDragging = defaultRadiusWhileDragging,
  9. Color color = Colors.grey,
  10. ScrollNotificationPredicate? notificationPredicate,
})

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 CScrollbar({
  Key? key,
  required Widget child,
  ScrollController? controller,
  bool isAlwaysShown = false,
  double thickness = defaultThickness,
  this.thicknessWhileDragging = defaultThicknessWhileDragging,
  Radius radius = defaultRadius,
  this.radiusWhileDragging = defaultRadiusWhileDragging,
  this.color = Colors.grey,
  ScrollNotificationPredicate? notificationPredicate,
})  :
      assert(thickness < double.infinity),
      assert(thicknessWhileDragging < double.infinity),
      super(
        key: key,
        child: child,
        controller: controller,
        isAlwaysShown: isAlwaysShown,
        thickness: thickness,
        radius: radius,
        fadeDuration: _kScrollbarFadeDuration,
        timeToFade: _kScrollbarTimeToFade,
        pressDuration: const Duration(milliseconds: 100),
        notificationPredicate:
            notificationPredicate ?? defaultScrollNotificationPredicate,
      );