pub struct ScrollableDetails {
pub direction: AxisDirection,
pub controller: Option<ScrollControllerRef>,
pub physics: Option<ScrollPhysicsRef>,
pub decoration_clip_behavior: Option<Clip>,
}Expand description
Describes the aspects of a Scrollable widget to inform inherited widgets
like crate::ScrollBehavior for decorating or enumerate the properties of combined
scrollables, such as TwoDimensionalScrollable.
Decorations like GlowingOverscrollIndicators and Scrollbars require
information about the scrollable in order to be initialized.
Fields§
§direction: AxisDirectionThe direction in which the widget scrolls.
controller: Option<ScrollControllerRef>An object that can be used to control the position to which the widget is scrolled.
physics: Option<ScrollPhysicsRef>How the widgets should respond to user input.
decoration_clip_behavior: Option<Clip>The clip a decorator such as a StretchingOverscrollIndicator should honour.
This Clip does not affect the viewport’s own clip behaviour, but is rather
passed from the same value by Scrollable so that decorators honour the same clip.
Defaults to None.
Implementations§
Source§impl ScrollableDetails
impl ScrollableDetails
Sourcepub fn new(direction: AxisDirection) -> ScrollableDetails
pub fn new(direction: AxisDirection) -> ScrollableDetails
Creates a set of details describing the Scrollable.
Sourcepub fn vertical(reverse: bool) -> ScrollableDetails
pub fn vertical(reverse: bool) -> ScrollableDetails
A constructor specific to a Scrollable with an waft_painting::Axis::Vertical.
Sourcepub fn horizontal(reverse: bool) -> ScrollableDetails
pub fn horizontal(reverse: bool) -> ScrollableDetails
A constructor specific to a Scrollable with an waft_painting::Axis::Horizontal.
Sourcepub fn controller(self, controller: ScrollControllerRef) -> ScrollableDetails
pub fn controller(self, controller: ScrollControllerRef) -> ScrollableDetails
Dart ScrollableDetails(controller:).
Sourcepub fn physics(self, physics: ScrollPhysicsRef) -> ScrollableDetails
pub fn physics(self, physics: ScrollPhysicsRef) -> ScrollableDetails
Dart ScrollableDetails(physics:).
Sourcepub fn decoration_clip_behavior(
self,
decoration_clip_behavior: Clip,
) -> ScrollableDetails
pub fn decoration_clip_behavior( self, decoration_clip_behavior: Clip, ) -> ScrollableDetails
Dart ScrollableDetails(decorationClipBehavior:).
Sourcepub fn clip_behavior(self, clip_behavior: Clip) -> ScrollableDetails
👎Deprecated: Migrate to decoration_clip_behavior. This property was deprecated so that its application is clearer. This clip applies to decorators, and does not directly clip a scroll view. This feature was deprecated after v3.9.0-1.0.pre.
pub fn clip_behavior(self, clip_behavior: Clip) -> ScrollableDetails
Migrate to decoration_clip_behavior. This property was deprecated so that its application is clearer. This clip applies to decorators, and does not directly clip a scroll view. This feature was deprecated after v3.9.0-1.0.pre.
Deprecated setter for
decoration_clip_behavior.
Sourcepub fn copy_with(&self) -> ScrollableDetails
pub fn copy_with(&self) -> ScrollableDetails
Copy the current ScrollableDetails with the given values replacing the
current values.