pub struct FixedScrollMetrics { /* private fields */ }Expand description
An immutable snapshot of values associated with a Scrollable viewport.
For details, see ScrollMetrics, which defines this object’s interfaces.
Implementations§
Source§impl FixedScrollMetrics
impl FixedScrollMetrics
Sourcepub fn new(
min_scroll_extent: Option<f64>,
max_scroll_extent: Option<f64>,
pixels: Option<f64>,
viewport_dimension: Option<f64>,
axis_direction: AxisDirection,
device_pixel_ratio: f64,
) -> FixedScrollMetrics
pub fn new( min_scroll_extent: Option<f64>, max_scroll_extent: Option<f64>, pixels: Option<f64>, viewport_dimension: Option<f64>, axis_direction: AxisDirection, device_pixel_ratio: f64, ) -> FixedScrollMetrics
Creates an immutable snapshot of values associated with a Scrollable viewport.
Sourcepub fn with_min_scroll_extent(
self,
min_scroll_extent: f64,
) -> FixedScrollMetrics
pub fn with_min_scroll_extent( self, min_scroll_extent: f64, ) -> FixedScrollMetrics
Dart copyWith(minScrollExtent:).
Sourcepub fn with_max_scroll_extent(
self,
max_scroll_extent: f64,
) -> FixedScrollMetrics
pub fn with_max_scroll_extent( self, max_scroll_extent: f64, ) -> FixedScrollMetrics
Dart copyWith(maxScrollExtent:).
Sourcepub fn with_pixels(self, pixels: f64) -> FixedScrollMetrics
pub fn with_pixels(self, pixels: f64) -> FixedScrollMetrics
Dart copyWith(pixels:).
Sourcepub fn with_viewport_dimension(
self,
viewport_dimension: f64,
) -> FixedScrollMetrics
pub fn with_viewport_dimension( self, viewport_dimension: f64, ) -> FixedScrollMetrics
Dart copyWith(viewportDimension:).
Sourcepub fn with_axis_direction(
self,
axis_direction: AxisDirection,
) -> FixedScrollMetrics
pub fn with_axis_direction( self, axis_direction: AxisDirection, ) -> FixedScrollMetrics
Dart copyWith(axisDirection:).
Sourcepub fn with_device_pixel_ratio(
self,
device_pixel_ratio: f64,
) -> FixedScrollMetrics
pub fn with_device_pixel_ratio( self, device_pixel_ratio: f64, ) -> FixedScrollMetrics
Dart copyWith(devicePixelRatio:).
Trait Implementations§
Source§impl Clone for FixedScrollMetrics
impl Clone for FixedScrollMetrics
impl Copy for FixedScrollMetrics
Source§impl Debug for FixedScrollMetrics
impl Debug for FixedScrollMetrics
Source§impl ScrollMetrics for FixedScrollMetrics
impl ScrollMetrics for FixedScrollMetrics
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Downcast support for Dart’s
is on a metrics object (position is _PagePosition).Source§fn has_content_dimensions(&self) -> bool
fn has_content_dimensions(&self) -> bool
Whether the
min_scroll_extent and the
max_scroll_extent properties are available.Source§fn pixels(&self) -> f64
fn pixels(&self) -> f64
The current scroll position, in logical pixels along the
axis_direction.Source§fn has_pixels(&self) -> bool
fn has_pixels(&self) -> bool
Whether the
pixels property is available.Source§fn viewport_dimension(&self) -> f64
fn viewport_dimension(&self) -> f64
The extent of the viewport along the
axis_direction.Source§fn has_viewport_dimension(&self) -> bool
fn has_viewport_dimension(&self) -> bool
Whether the
viewport_dimension property is available.Source§fn axis_direction(&self) -> AxisDirection
fn axis_direction(&self) -> AxisDirection
The direction in which the scroll view scrolls.
Source§fn device_pixel_ratio(&self) -> f64
fn device_pixel_ratio(&self) -> f64
The
FlutterView.devicePixelRatio of the view that the Scrollable
associated with this metrics object is drawn into.Source§fn copy_with(&self) -> FixedScrollMetrics
fn copy_with(&self) -> FixedScrollMetrics
Creates a
ScrollMetrics that has the same properties as this object. Read moreSource§fn out_of_range(&self) -> bool
fn out_of_range(&self) -> bool
Source§fn extent_before(&self) -> f64
fn extent_before(&self) -> f64
The quantity of content conceptually “above” the viewport in the scrollable.
This is the content above the content described by
extent_inside.Source§fn extent_inside(&self) -> f64
fn extent_inside(&self) -> f64
The quantity of content conceptually “inside” the viewport in the
scrollable (including empty space if the total amount of content is less
than the
viewport_dimension). Read moreSource§fn extent_after(&self) -> f64
fn extent_after(&self) -> f64
The quantity of content conceptually “below” the viewport in the scrollable.
This is the content below the content described by
extent_inside.Source§fn extent_total(&self) -> f64
fn extent_total(&self) -> f64
The total quantity of content available. Read more
Auto Trait Implementations§
impl Forget for FixedScrollMetrics
impl Freeze for FixedScrollMetrics
impl Move for FixedScrollMetrics
impl RefUnwindSafe for FixedScrollMetrics
impl Send for FixedScrollMetrics
impl Sync for FixedScrollMetrics
impl Unpin for FixedScrollMetrics
impl UnsafeUnpin for FixedScrollMetrics
impl UnwindSafe for FixedScrollMetrics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more