Skip to main content

FixedViewportOffset

Struct FixedViewportOffset 

Source
pub struct FixedViewportOffset { /* private fields */ }
Expand description

A ViewportOffset whose pixels value does not change unless the viewport issues a correction.

Flutter’s private _FixedViewportOffset, reached through the ViewportOffset.fixed and ViewportOffset.zero factories.

Implementations§

Source§

impl FixedViewportOffset

Source

pub fn new(app: &mut App, value: f64) -> Handle<FixedViewportOffset>

Creates a viewport offset with the given pixels value.

Dart’s ViewportOffset.fixed.

Source

pub fn zero(app: &mut App) -> Handle<FixedViewportOffset>

Creates a viewport offset with a pixels value of 0.0.

Dart’s ViewportOffset.zero.

Trait Implementations§

Source§

impl ChangeNotifier for FixedViewportOffset

Source§

fn change_notifier_data(&self) -> &ChangeNotifierData

Source§

fn change_notifier_data_mut(&mut self) -> &mut ChangeNotifierData

Source§

fn will_add_listener(self: Handle<Self>, app: &mut App)

Runs before the listener is stored. Dart overrides of addListener that work before super.addListener go here.
Source§

fn did_remove_listener(self: Handle<Self>, app: &mut App)

Runs after the listener is removed. Dart overrides of removeListener that work after super.removeListener go here.
Source§

impl Debug for FixedViewportOffset

Source§

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

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

impl Default for FixedViewportOffset

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl ViewportOffset for FixedViewportOffset

Source§

fn pixels(self: Handle<Self>, app: &App) -> f64

The number of pixels to offset the children in the opposite of the axis direction. Read more
Source§

fn has_pixels(self: Handle<Self>, _app: &App) -> bool

Whether the pixels property is available.
Source§

fn apply_viewport_dimension( self: Handle<Self>, _app: &mut App, _viewport_dimension: f64, ) -> bool

Called when the viewport’s extents are established. Read more
Source§

fn apply_content_dimensions( self: Handle<Self>, _app: &mut App, _min_scroll_extent: f64, _max_scroll_extent: f64, ) -> bool

Called when the viewport’s content extents are established. Read more
Source§

fn correct_by(self: Handle<Self>, app: &mut App, correction: f64)

Apply a layout-time correction to the scroll offset. Read more
Source§

fn jump_to(self: Handle<Self>, _app: &mut App, _pixels: f64)

Jumps pixels from its current value to the given value, without animation, and without checking if the new value is in range. Read more
Source§

fn animate_to( self: Handle<Self>, _app: &mut App, _to: f64, _duration: Duration, _curve: Rc<dyn Curve>, ) -> CompleterFuture<()> ⓘ

Animates pixels from its current value to the given value. Read more
Source§

fn user_scroll_direction(self: Handle<Self>, _app: &App) -> ScrollDirection

The direction in which the user is trying to change pixels, relative to the viewport’s axis_direction. Read more
Source§

fn allow_implicit_scrolling(self: Handle<Self>, _app: &App) -> bool

Whether a viewport is allowed to change pixels implicitly to respond to a call to crate::RenderObject::show_on_screen. Read more
Source§

fn move_to( self: Handle<Self>, app: &mut App, to: f64, duration: Option<Duration>, curve: Option<Rc<dyn Curve>>, clamp: Option<bool>, ) -> CompleterFuture<()> ⓘ

Calls jump_to if duration is None or zero, otherwise animate_to is called. Read more
Source§

fn debug_fill_description( self: Handle<Self>, app: &App, description: &mut Vec<String>, )

Add additional information to the given description for use by Dart’s toString. Read more
Source§

fn as_viewport_offset(self: Handle<Self>) -> AnyViewportOffset

The type-erased ViewportOffset handle. Free: the vtable is a const, and the id is copied.

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> 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> ListenableObject for T
where T: ChangeNotifier,

Source§

fn add_listener(self: Handle<T>, app: &mut App, listener: Listener)

Register a closure to be called when the object notifies its listeners.
Source§

fn remove_listener(self: Handle<T>, app: &mut App, listener: &Listener)

Remove a previously registered closure from the list of closures that the object notifies.
Source§

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

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>