Skip to main content

AnyScrollPosition

Struct AnyScrollPosition 

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

Erased ScrollPosition: what a field or parameter Dart types as ScrollPosition becomes.

Equality is Dart’s == on an object reference.

Implementations§

Source§

impl AnyScrollPosition

Source

pub fn upgrade(self, app: &App) -> Option<Retained<AnyScrollPosition>>

A reference while something still keeps the object, None once it is freed or its last keeper has let go; see Handle::upgrade.

Source

pub fn keep(self, app: &App) -> Retained<AnyScrollPosition>

A reference to an object something is known to keep; see Handle::keep.

Source§

impl AnyScrollPosition

Source

pub fn identity_hash(self) -> u64

Dart’s position.runtimeType. The identity a dump shows, Dart’s describeIdentity(position) without the description Dart’s toString collects.

Source

pub fn type_id(self) -> TypeId

Source

pub fn downcast<P: ScrollPosition>(self, app: &App) -> Option<Handle<P>>

The typed handle, when this position is a P; Dart’s position is P.

Source

pub fn as_viewport_offset(self) -> AnyViewportOffset

This position as an erased ViewportOffset.

Source

pub fn physics(self, app: &App) -> ScrollPhysicsRef

Source

pub fn context(self, app: &App) -> Rc<dyn ScrollContext>

Source

pub fn keep_scroll_offset(self, app: &App) -> bool

Source

pub fn debug_label(self, app: &App) -> Option<String>

Source

pub fn min_scroll_extent(self, app: &App) -> f64

Source

pub fn max_scroll_extent(self, app: &App) -> f64

Source

pub fn has_content_dimensions(self, app: &App) -> bool

Source

pub fn pixels(self, app: &App) -> f64

Source

pub fn has_pixels(self, app: &App) -> bool

Source

pub fn viewport_dimension(self, app: &App) -> f64

Source

pub fn has_viewport_dimension(self, app: &App) -> bool

Source

pub fn axis_direction(self, app: &App) -> AxisDirection

Source

pub fn axis(self, app: &App) -> Axis

Source

pub fn device_pixel_ratio(self, app: &App) -> f64

Source

pub fn copy_with(self, app: &App) -> Rc<dyn ScrollMetrics>

Source

pub fn out_of_range(self, app: &App) -> bool

Source

pub fn at_edge(self, app: &App) -> bool

Source

pub fn extent_before(self, app: &App) -> f64

Source

pub fn extent_inside(self, app: &App) -> f64

Source

pub fn extent_after(self, app: &App) -> f64

Source

pub fn extent_total(self, app: &App) -> f64

Source

pub fn have_dimensions(self, app: &App) -> bool

Source

pub fn should_ignore_pointer(self, app: &App) -> bool

Source

pub fn absorb(self, app: &mut App, other: AnyScrollPosition)

Source

pub fn set_pixels(self, app: &mut App, new_pixels: f64) -> f64

Source

pub fn correct_pixels(self, app: &mut App, value: f64)

Source

pub fn correct_by(self, app: &mut App, correction: f64)

Source

pub fn apply_viewport_dimension( self, app: &mut App, viewport_dimension: f64, ) -> bool

Source

pub fn apply_content_dimensions( self, app: &mut App, min_scroll_extent: f64, max_scroll_extent: f64, ) -> bool

Source

pub fn ensure_visible( self, app: &mut App, object: AnyRenderObject, alignment: f64, duration: Duration, curve: Rc<dyn Curve>, alignment_policy: ScrollPositionAlignmentPolicy, target_render_object: Option<AnyRenderObject>, ) -> CompleterFuture<()> ⓘ

Source

pub fn is_scrolling_notifier(self, app: &App) -> Handle<ValueNotifier<bool>>

Source

pub fn animate_to( self, app: &mut App, to: f64, duration: Duration, curve: Rc<dyn Curve>, ) -> CompleterFuture<()> ⓘ

Source

pub fn jump_to(self, app: &mut App, value: f64)

Source

pub fn pointer_scroll(self, app: &mut App, delta: f64)

Source

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

Source

pub fn user_scroll_direction(self, app: &App) -> ScrollDirection

Source

pub fn allow_implicit_scrolling(self, app: &App) -> bool

Source

pub fn jump_to_without_settling(self, app: &mut App, value: f64)

👎Deprecated:

This method bypasses scroll activity management and can cause inconsistent layouts or scrolling behavior. Use jump_to or a custom ScrollPosition instead.

Source

pub fn hold( self, app: &mut App, hold_cancel_callback: Listener, ) -> Rc<dyn ScrollHoldController>

Source

pub fn drag( self, app: &mut App, details: DragStartDetails, drag_cancel_callback: Listener, ) -> Rc<dyn Drag>

Source

pub fn restore_offset(self, app: &mut App, offset: f64, initial_restore: bool)

Source

pub fn activity(self, app: &App) -> Option<AnyScrollActivity>

Source

pub fn begin_activity( self, app: &mut App, new_activity: Option<ScrollActivityRef>, )

Source

pub fn did_start_scroll(self, app: &mut App)

Source

pub fn did_update_scroll_position_by(self, app: &mut App, delta: f64)

Source

pub fn did_end_scroll(self, app: &mut App)

Source

pub fn did_overscroll_by(self, app: &mut App, value: f64)

Source

pub fn did_update_scroll_direction( self, app: &mut App, direction: ScrollDirection, )

Source

pub fn did_update_scroll_metrics(self, app: &mut App)

Source

pub fn recommend_deferred_loading( self, app: &mut App, context: BuildContext, ) -> bool

Source

pub fn dispose(self, app: &mut App)

Source

pub fn to_string(self, app: &App) -> String

Trait Implementations§

Source§

impl Clone for AnyScrollPosition

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 AnyScrollPosition

Source§

impl Debug for AnyScrollPosition

Source§

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

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

impl Eq for AnyScrollPosition

Source§

impl From<AnyScrollPosition> for HandleId

Source§

fn from(handle: AnyScrollPosition) -> HandleId

Converts to this type from the input type.
Source§

impl From<AnyScrollPosition> for AnyViewportOffset

A kept position erases to a ViewportOffsetRef with Retained::erase: Dart’s upcast of a ScrollPosition to the ViewportOffset a viewport keeps.

Source§

fn from(position: AnyScrollPosition) -> AnyViewportOffset

Converts to this type from the input type.
Source§

impl<Leaf: ScrollPosition> From<Handle<Leaf>> for AnyScrollPosition

Source§

fn from(handle: Handle<Leaf>) -> AnyScrollPosition

Converts to this type from the input type.
Source§

impl Hash for AnyScrollPosition

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Listenable for AnyScrollPosition

Source§

fn add_listener(&self, app: &mut App, listener: Listener)

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

fn remove_listener(&self, app: &mut App, listener: &Listener)

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

impl PartialEq for AnyScrollPosition

Source§

fn eq(&self, other: &AnyScrollPosition) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<AnyScrollPosition> for &Retained<AnyScrollPosition>

Source§

fn eq(&self, other: &AnyScrollPosition) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<Retained<AnyScrollPosition>> for AnyScrollPosition

Source§

fn eq(&self, other: &Retained<AnyScrollPosition>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl Forget for AnyScrollPosition

§

impl Freeze for AnyScrollPosition
where NonZero<u32>: Freeze, &'static ScrollPositionVTable: Freeze,

§

impl Move for AnyScrollPosition

§

impl RefUnwindSafe for AnyScrollPosition

§

impl Send for AnyScrollPosition
where NonZero<u32>: Send, &'static ScrollPositionVTable: Send,

§

impl Sync for AnyScrollPosition
where NonZero<u32>: Sync,

§

impl Unpin for AnyScrollPosition
where NonZero<u32>: Unpin, &'static ScrollPositionVTable: Unpin,

§

impl UnsafeUnpin for AnyScrollPosition
where NonZeroU32Inner: UnsafeUnpin, &'static ScrollPositionVTable: UnsafeUnpin,

§

impl UnwindSafe for AnyScrollPosition
where NonZero<u32>: UnwindSafe, &'static ScrollPositionVTable: UnwindSafe,

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> AnyEq for T
where T: PartialEq + Hash + Debug + 'static,

Source§

fn eq_any(&self, other: &(dyn AnyEq + 'static)) -> bool

Dart’s operator ==. Must return false when other is a different concrete type, even if the two carry the same value.
Source§

fn hash_any(&self, state: &mut dyn Hasher)

Dart’s hashCode. Must mix in the concrete type so that two types carrying the same value do not collide.
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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> SlotValue for T
where T: Clone + Eq + Hash + Debug + 'static,

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,