Skip to main content

FixedScrollMetrics

Struct FixedScrollMetrics 

Source
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

Source

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.

Source

pub fn with_min_scroll_extent( self, min_scroll_extent: f64, ) -> FixedScrollMetrics

Dart copyWith(minScrollExtent:).

Source

pub fn with_max_scroll_extent( self, max_scroll_extent: f64, ) -> FixedScrollMetrics

Dart copyWith(maxScrollExtent:).

Source

pub fn with_pixels(self, pixels: f64) -> FixedScrollMetrics

Dart copyWith(pixels:).

Source

pub fn with_viewport_dimension( self, viewport_dimension: f64, ) -> FixedScrollMetrics

Dart copyWith(viewportDimension:).

Source

pub fn with_axis_direction( self, axis_direction: AxisDirection, ) -> FixedScrollMetrics

Dart copyWith(axisDirection:).

Source

pub fn with_device_pixel_ratio( self, device_pixel_ratio: f64, ) -> FixedScrollMetrics

Dart copyWith(devicePixelRatio:).

Trait Implementations§

Source§

impl Clone for FixedScrollMetrics

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FixedScrollMetrics

Source§

impl Debug for FixedScrollMetrics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ScrollMetrics for FixedScrollMetrics

Source§

fn as_any(&self) -> &dyn Any

Downcast support for Dart’s is on a metrics object (position is _PagePosition).
Source§

fn min_scroll_extent(&self) -> f64

The minimum in-range value for pixels. Read more
Source§

fn max_scroll_extent(&self) -> f64

The maximum in-range value for pixels. Read more
Source§

fn has_content_dimensions(&self) -> bool

Whether the min_scroll_extent and the max_scroll_extent properties are available.
Source§

fn pixels(&self) -> f64

The current scroll position, in logical pixels along the axis_direction.
Source§

fn has_pixels(&self) -> bool

Whether the pixels property is available.
Source§

fn viewport_dimension(&self) -> f64

The extent of the viewport along the axis_direction.
Source§

fn has_viewport_dimension(&self) -> bool

Whether the viewport_dimension property is available.
Source§

fn axis_direction(&self) -> AxisDirection

The direction in which the scroll view scrolls.
Source§

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

Creates a ScrollMetrics that has the same properties as this object. Read more
Source§

fn axis(&self) -> Axis

The axis in which the scroll view scrolls.
Source§

fn out_of_range(&self) -> bool

Whether the pixels value is outside the min_scroll_extent and max_scroll_extent.
Source§

fn at_edge(&self) -> bool

Whether the pixels value is exactly at the min_scroll_extent or the max_scroll_extent.
Source§

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

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 more
Source§

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

The total quantity of content available. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,