copyWith method
- bool? scrollbars,
- bool? overscroll,
- Set<
PointerDeviceKind> ? dragDevices, - MultitouchDragStrategy? multitouchDragStrategy,
- Set<
LogicalKeyboardKey> ? pointerAxisModifiers, - ScrollPhysics? physics,
- TargetPlatform? platform,
Creates a copy of this ScrollBehavior, making it possible to
easily toggle scrollbar
and overscrollIndicator
effects.
This is used by widgets like PageView and ListWheelScrollView to override the current ScrollBehavior and manage how they are decorated. Widgets such as these have the option to provide a ScrollBehavior on the widget level, like PageView.scrollBehavior, in order to change the default.
Implementation
ScrollBehavior copyWith({
bool? scrollbars,
bool? overscroll,
Set<PointerDeviceKind>? dragDevices,
MultitouchDragStrategy? multitouchDragStrategy,
Set<LogicalKeyboardKey>? pointerAxisModifiers,
ScrollPhysics? physics,
TargetPlatform? platform,
}) {
return _WrappedScrollBehavior(
delegate: this,
scrollbars: scrollbars ?? true,
overscroll: overscroll ?? true,
dragDevices: dragDevices,
multitouchDragStrategy: multitouchDragStrategy,
pointerAxisModifiers: pointerAxisModifiers,
physics: physics,
platform: platform,
);
}