buildScrollbar method
Applies a RawScrollbar to the child widget on desktop platforms.
Implementation
@override
Widget buildScrollbar(
BuildContext context, Widget child, ScrollableDetails details) {
switch (getPlatform(context)) {
case TargetPlatform.linux:
case TargetPlatform.macOS:
case TargetPlatform.windows:
assert(details.controller != null);
if (details.controller!.positions.length > 1 ||
details.controller!.debugLabel == 'inner') {
return child;
}
return Scrollbar(
controller: details.controller,
child: child,
);
case TargetPlatform.android:
case TargetPlatform.fuchsia:
case TargetPlatform.iOS:
return child;
default:
return child;
}
}