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
impl AnyScrollPosition
Sourcepub fn upgrade(self, app: &App) -> Option<Retained<AnyScrollPosition>>
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.
Sourcepub fn keep(self, app: &App) -> Retained<AnyScrollPosition>
pub fn keep(self, app: &App) -> Retained<AnyScrollPosition>
A reference to an object something is known to keep; see
Handle::keep.
Source§impl AnyScrollPosition
impl AnyScrollPosition
Sourcepub fn identity_hash(self) -> u64
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.
pub fn type_id(self) -> TypeId
Sourcepub fn downcast<P: ScrollPosition>(self, app: &App) -> Option<Handle<P>>
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.
Sourcepub fn as_viewport_offset(self) -> AnyViewportOffset
pub fn as_viewport_offset(self) -> AnyViewportOffset
This position as an erased ViewportOffset.
Sourcepub fn physics(self, app: &App) -> ScrollPhysicsRef
pub fn physics(self, app: &App) -> ScrollPhysicsRef
Sourcepub fn context(self, app: &App) -> Rc<dyn ScrollContext>
pub fn context(self, app: &App) -> Rc<dyn ScrollContext>
Sourcepub fn keep_scroll_offset(self, app: &App) -> bool
pub fn keep_scroll_offset(self, app: &App) -> bool
Sourcepub fn debug_label(self, app: &App) -> Option<String>
pub fn debug_label(self, app: &App) -> Option<String>
Sourcepub fn min_scroll_extent(self, app: &App) -> f64
pub fn min_scroll_extent(self, app: &App) -> f64
Sourcepub fn max_scroll_extent(self, app: &App) -> f64
pub fn max_scroll_extent(self, app: &App) -> f64
Sourcepub fn has_content_dimensions(self, app: &App) -> bool
pub fn has_content_dimensions(self, app: &App) -> bool
Sourcepub fn has_pixels(self, app: &App) -> bool
pub fn has_pixels(self, app: &App) -> bool
Sourcepub fn viewport_dimension(self, app: &App) -> f64
pub fn viewport_dimension(self, app: &App) -> f64
Sourcepub fn has_viewport_dimension(self, app: &App) -> bool
pub fn has_viewport_dimension(self, app: &App) -> bool
Sourcepub fn axis_direction(self, app: &App) -> AxisDirection
pub fn axis_direction(self, app: &App) -> AxisDirection
Sourcepub fn axis(self, app: &App) -> Axis
pub fn axis(self, app: &App) -> Axis
See ScrollMetrics::axis.
Sourcepub fn device_pixel_ratio(self, app: &App) -> f64
pub fn device_pixel_ratio(self, app: &App) -> f64
Sourcepub fn copy_with(self, app: &App) -> Rc<dyn ScrollMetrics>
pub fn copy_with(self, app: &App) -> Rc<dyn ScrollMetrics>
Sourcepub fn out_of_range(self, app: &App) -> bool
pub fn out_of_range(self, app: &App) -> bool
Sourcepub fn extent_before(self, app: &App) -> f64
pub fn extent_before(self, app: &App) -> f64
Sourcepub fn extent_inside(self, app: &App) -> f64
pub fn extent_inside(self, app: &App) -> f64
Sourcepub fn extent_after(self, app: &App) -> f64
pub fn extent_after(self, app: &App) -> f64
Sourcepub fn extent_total(self, app: &App) -> f64
pub fn extent_total(self, app: &App) -> f64
Sourcepub fn have_dimensions(self, app: &App) -> bool
pub fn have_dimensions(self, app: &App) -> bool
Sourcepub fn should_ignore_pointer(self, app: &App) -> bool
pub fn should_ignore_pointer(self, app: &App) -> bool
Sourcepub fn absorb(self, app: &mut App, other: AnyScrollPosition)
pub fn absorb(self, app: &mut App, other: AnyScrollPosition)
Sourcepub fn set_pixels(self, app: &mut App, new_pixels: f64) -> f64
pub fn set_pixels(self, app: &mut App, new_pixels: f64) -> f64
Sourcepub fn correct_pixels(self, app: &mut App, value: f64)
pub fn correct_pixels(self, app: &mut App, value: f64)
Sourcepub fn correct_by(self, app: &mut App, correction: f64)
pub fn correct_by(self, app: &mut App, correction: f64)
Sourcepub fn apply_viewport_dimension(
self,
app: &mut App,
viewport_dimension: f64,
) -> bool
pub fn apply_viewport_dimension( self, app: &mut App, viewport_dimension: f64, ) -> bool
Sourcepub fn apply_content_dimensions(
self,
app: &mut App,
min_scroll_extent: f64,
max_scroll_extent: f64,
) -> bool
pub fn apply_content_dimensions( self, app: &mut App, min_scroll_extent: f64, max_scroll_extent: f64, ) -> bool
Sourcepub 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<()> ⓘ
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<()> ⓘ
Sourcepub fn is_scrolling_notifier(self, app: &App) -> Handle<ValueNotifier<bool>>
pub fn is_scrolling_notifier(self, app: &App) -> Handle<ValueNotifier<bool>>
Sourcepub fn animate_to(
self,
app: &mut App,
to: f64,
duration: Duration,
curve: Rc<dyn Curve>,
) -> CompleterFuture<()> ⓘ
pub fn animate_to( self, app: &mut App, to: f64, duration: Duration, curve: Rc<dyn Curve>, ) -> CompleterFuture<()> ⓘ
Sourcepub fn pointer_scroll(self, app: &mut App, delta: f64)
pub fn pointer_scroll(self, app: &mut App, delta: f64)
Sourcepub fn move_to(
self,
app: &mut App,
to: f64,
duration: Option<Duration>,
curve: Option<Rc<dyn Curve>>,
clamp: Option<bool>,
) -> CompleterFuture<()> ⓘ
pub fn move_to( self, app: &mut App, to: f64, duration: Option<Duration>, curve: Option<Rc<dyn Curve>>, clamp: Option<bool>, ) -> CompleterFuture<()> ⓘ
Sourcepub fn user_scroll_direction(self, app: &App) -> ScrollDirection
pub fn user_scroll_direction(self, app: &App) -> ScrollDirection
Sourcepub fn allow_implicit_scrolling(self, app: &App) -> bool
pub fn allow_implicit_scrolling(self, app: &App) -> bool
Sourcepub 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.
pub fn jump_to_without_settling(self, app: &mut App, value: f64)
This method bypasses scroll activity management and can cause inconsistent layouts or scrolling behavior. Use jump_to or a custom ScrollPosition instead.
Sourcepub fn hold(
self,
app: &mut App,
hold_cancel_callback: Listener,
) -> Rc<dyn ScrollHoldController>
pub fn hold( self, app: &mut App, hold_cancel_callback: Listener, ) -> Rc<dyn ScrollHoldController>
See ScrollPosition::hold.
Sourcepub fn drag(
self,
app: &mut App,
details: DragStartDetails,
drag_cancel_callback: Listener,
) -> Rc<dyn Drag>
pub fn drag( self, app: &mut App, details: DragStartDetails, drag_cancel_callback: Listener, ) -> Rc<dyn Drag>
See ScrollPosition::drag.
Sourcepub fn restore_offset(self, app: &mut App, offset: f64, initial_restore: bool)
pub fn restore_offset(self, app: &mut App, offset: f64, initial_restore: bool)
Sourcepub fn activity(self, app: &App) -> Option<AnyScrollActivity>
pub fn activity(self, app: &App) -> Option<AnyScrollActivity>
Sourcepub fn begin_activity(
self,
app: &mut App,
new_activity: Option<ScrollActivityRef>,
)
pub fn begin_activity( self, app: &mut App, new_activity: Option<ScrollActivityRef>, )
Sourcepub fn did_start_scroll(self, app: &mut App)
pub fn did_start_scroll(self, app: &mut App)
Sourcepub fn did_update_scroll_position_by(self, app: &mut App, delta: f64)
pub fn did_update_scroll_position_by(self, app: &mut App, delta: f64)
Sourcepub fn did_end_scroll(self, app: &mut App)
pub fn did_end_scroll(self, app: &mut App)
Sourcepub fn did_overscroll_by(self, app: &mut App, value: f64)
pub fn did_overscroll_by(self, app: &mut App, value: f64)
Sourcepub fn did_update_scroll_direction(
self,
app: &mut App,
direction: ScrollDirection,
)
pub fn did_update_scroll_direction( self, app: &mut App, direction: ScrollDirection, )
Sourcepub fn did_update_scroll_metrics(self, app: &mut App)
pub fn did_update_scroll_metrics(self, app: &mut App)
Sourcepub fn recommend_deferred_loading(
self,
app: &mut App,
context: BuildContext,
) -> bool
pub fn recommend_deferred_loading( self, app: &mut App, context: BuildContext, ) -> bool
Trait Implementations§
Source§impl Clone for AnyScrollPosition
impl Clone for AnyScrollPosition
impl Copy for AnyScrollPosition
Source§impl Debug for AnyScrollPosition
impl Debug for AnyScrollPosition
impl Eq for AnyScrollPosition
Source§impl From<AnyScrollPosition> for HandleId
impl From<AnyScrollPosition> for HandleId
Source§fn from(handle: AnyScrollPosition) -> HandleId
fn from(handle: AnyScrollPosition) -> HandleId
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.
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
fn from(position: AnyScrollPosition) -> AnyViewportOffset
Source§impl<Leaf: ScrollPosition> From<Handle<Leaf>> for AnyScrollPosition
impl<Leaf: ScrollPosition> From<Handle<Leaf>> for AnyScrollPosition
Source§fn from(handle: Handle<Leaf>) -> AnyScrollPosition
fn from(handle: Handle<Leaf>) -> AnyScrollPosition
Source§impl Hash for AnyScrollPosition
impl Hash for AnyScrollPosition
Source§impl Listenable for AnyScrollPosition
impl Listenable for AnyScrollPosition
Source§fn add_listener(&self, app: &mut App, listener: Listener)
fn add_listener(&self, app: &mut App, listener: Listener)
Source§fn remove_listener(&self, app: &mut App, listener: &Listener)
fn remove_listener(&self, app: &mut App, listener: &Listener)
Source§impl PartialEq for AnyScrollPosition
impl PartialEq for AnyScrollPosition
Source§impl PartialEq<AnyScrollPosition> for &Retained<AnyScrollPosition>
impl PartialEq<AnyScrollPosition> for &Retained<AnyScrollPosition>
Auto Trait Implementations§
impl Forget for AnyScrollPosition
impl Freeze for AnyScrollPosition
impl Move for AnyScrollPosition
impl RefUnwindSafe for AnyScrollPosition
impl Send for AnyScrollPosition
impl Sync for AnyScrollPosition
impl Unpin for AnyScrollPosition
impl UnsafeUnpin for AnyScrollPositionwhere
NonZeroU32Inner: UnsafeUnpin,
&'static ScrollPositionVTable: UnsafeUnpin,
impl UnwindSafe for AnyScrollPosition
Blanket Implementations§
Source§impl<T> AnyEq for T
impl<T> AnyEq for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.