Scrollbar constructor
- Key? key,
- required Widget child,
- ScrollController? controller,
- bool? thumbVisibility,
- bool? trackVisibility,
- double? thickness,
- Radius? radius,
- ScrollNotificationPredicate? notificationPredicate,
- bool? interactive,
- ScrollbarOrientation? scrollbarOrientation,
Creates a Material Design scrollbar that by default will connect to the
closest Scrollable descendant of child.
The child should be a source of ScrollNotification notifications,
typically a Scrollable widget.
If the controller is null, the default behavior is to
enable scrollbar dragging using the PrimaryScrollController.
When null, thickness defaults to 8.0 pixels on desktop and web, and 4.0
pixels when on mobile platforms. A null radius will result in a default
of an 8.0 pixel circular radius about the corners of the scrollbar thumb,
except for when executing on TargetPlatform.android, which will render the
thumb without a radius.
Implementation
const Scrollbar({
super.key,
required this.child,
this.controller,
this.thumbVisibility,
this.trackVisibility,
this.thickness,
this.radius,
this.notificationPredicate,
this.interactive,
this.scrollbarOrientation,
});