pub struct RawScrollbarData {Show 23 fields
pub key: Option<KeyRef>,
pub child: WidgetRef,
pub controller: Option<ScrollControllerRef>,
pub thumb_visibility: Option<bool>,
pub shape: Option<OutlinedBorderRef>,
pub radius: Option<Radius>,
pub thickness: Option<f64>,
pub thumb_color: Option<Color>,
pub min_thumb_length: f64,
pub min_overscroll_length: Option<f64>,
pub track_visibility: Option<bool>,
pub track_radius: Option<Radius>,
pub track_color: Option<Color>,
pub track_border_color: Option<Color>,
pub fade_duration: Duration,
pub time_to_fade: Duration,
pub press_duration: Duration,
pub notification_predicate: ScrollNotificationPredicate,
pub interactive: Option<bool>,
pub scrollbar_orientation: Option<ScrollbarOrientation>,
pub main_axis_margin: f64,
pub cross_axis_margin: f64,
pub padding: Option<EdgeInsetsGeometry>,
}Expand description
The fields of Dart’s RawScrollbar, which its subclasses carry.
Fields§
§key: Option<KeyRef>§child: WidgetRefThe widget below this widget in the tree.
The scrollbar will be stacked on top of this child. This child (and its
subtree) should include a source of ScrollNotification notifications.
controller: Option<ScrollControllerRef>The scroll controller used to implement scrollbar dragging.
If nothing is passed, the default behavior is to automatically enable
scrollbar dragging on the nearest scroll controller using
PrimaryScrollController::of.
thumb_visibility: Option<bool>Indicates that the scrollbar thumb should be visible, even when a scroll is not underway.
When false, the scrollbar will be shown during scrolling and will fade out otherwise. When true, the scrollbar will always be visible and never fade out. This requires that the scrollbar can access the scroll controller of the associated scrollable widget.
Defaults to false when None.
shape: Option<OutlinedBorderRef>The OutlinedBorder of the scrollbar’s thumb.
Only one of radius and this may be specified.
radius: Option<Radius>The Radius of the scrollbar thumb’s rounded rectangle corners.
The scrollbar will be rectangular if this is None, which is the default
behavior.
thickness: Option<f64>The thickness of the scrollbar in the cross axis of the scrollable.
If None, defaults to 6.0 pixels.
thumb_color: Option<Color>The color of the scrollbar thumb.
If None, defaults to Color(0x66BCBCBC).
min_thumb_length: f64The preferred smallest size the scrollbar thumb can shrink to when the total scrollable extent is large, the current visible viewport is small, and the viewport is not overscrolled.
Defaults to 18.0.
min_overscroll_length: Option<f64>The preferred smallest size the scrollbar thumb can shrink to when the viewport is overscrolled.
When None, it defaults to the value of
min_thumb_length.
track_visibility: Option<bool>Indicates that the scrollbar track should be visible.
When true, the scrollbar track will always be visible so long as the thumb is visible. If the scrollbar thumb is not visible, the track will not be visible either.
Defaults to false when None.
track_radius: Option<Radius>The Radius of the scrollbar track’s rounded rectangle corners.
track_color: Option<Color>The color of the scrollbar track.
If None, defaults to Color(0x08000000).
track_border_color: Option<Color>The color of the scrollbar track’s border.
If None, defaults to Color(0x1a000000).
fade_duration: DurationThe Duration of the fade animation.
Defaults to 300 milliseconds.
time_to_fade: DurationThe Duration of time until the fade animation begins.
Defaults to 600 milliseconds.
press_duration: DurationThe Duration of time that a long press will trigger the drag gesture of
the scrollbar thumb.
Defaults to Duration::ZERO.
notification_predicate: ScrollNotificationPredicateA check that specifies whether a ScrollNotification should be handled by
this widget.
By default, checks whether notification.depth() == 0. That means if the
scrollbar is wrapped around multiple scroll views, it only responds to the
nearest one and shows the corresponding scrollbar thumb.
interactive: Option<bool>Whether the scrollbar should be interactive and respond to dragging on the thumb, or tapping in the track area.
When false, the scrollbar will not respond to gesture or hover events, and will allow to click through it.
Defaults to true when None.
scrollbar_orientation: Option<ScrollbarOrientation>Dictates the orientation of the scrollbar.
main_axis_margin: f64Distance from the scrollbar thumb’s start or end to the nearest edge of the viewport in logical pixels. It affects the amount of available paint area.
Defaults to 0.
cross_axis_margin: f64Distance from the scrollbar thumb’s side to the nearest cross axis edge in logical pixels.
Defaults to zero.
padding: Option<EdgeInsetsGeometry>The insets by which the scrollbar thumb and track should be padded.
When None, the inherited MediaQueryData.padding is used.
Implementations§
Source§impl RawScrollbarData
impl RawScrollbarData
Sourcepub fn new(child: WidgetRef) -> RawScrollbarData
pub fn new(child: WidgetRef) -> RawScrollbarData
Dart’s RawScrollbar constructor defaults.