buildScrollbar method

  1. @override
Widget buildScrollbar(
  1. BuildContext context,
  2. Widget child,
  3. ScrollableDetails details
)
override

Applies a RawScrollbar to the child widget on desktop platforms.

Implementation

@override
Widget buildScrollbar(BuildContext context , Widget child, ScrollableDetails details) {
  // When modifying this function, consider modifying the implementation in
  // the base class as well.
  switch (getPlatform(context)) {
    case TargetPlatform.linux:
    case TargetPlatform.macOS:
    case TargetPlatform.windows:
      assert(details.controller != null);
      return CupertinoScrollbar(
        controller: details.controller,
        child: child,
      );
    case TargetPlatform.android:
    case TargetPlatform.fuchsia:
    case TargetPlatform.iOS:
      return child;
  }
}