pub struct PullToRefresh { /* private fields */ }Expand description
Wraps child (typically a ListView/Column) with pull-to-refresh.
Implementations§
Source§impl PullToRefresh
impl PullToRefresh
pub fn new(child: impl Widget + 'static) -> Self
Sourcepub fn on_refresh(self, f: impl Fn() + Send + Sync + 'static) -> Self
pub fn on_refresh(self, f: impl Fn() + Send + Sync + 'static) -> Self
Fired once when the user releases past the trigger distance. Typical
use: flip an Atom<bool> (fed back via .refreshing(..)) and kick
off async work that flips it back when done.
Sourcepub fn refreshing(self, v: bool) -> Self
pub fn refreshing(self, v: bool) -> Self
Whether a refresh is in flight — shows a spinning (indeterminate)
indicator instead of the pull-progress ring while true.
Trait Implementations§
Source§impl Widget for PullToRefresh
impl Widget for PullToRefresh
Source§fn children(&self) -> Children<'_>
fn children(&self) -> Children<'_>
Declare this widget’s children. Drives every default below.
Source§fn layout(&self, ctx: &LayoutCtx<'_>) -> Size
fn layout(&self, ctx: &LayoutCtx<'_>) -> Size
Measure under
ctx.constraints and return a size within them. Read moreSource§fn flex_factor(&self) -> f32
fn flex_factor(&self) -> f32
Flex weight inside Row/Column. Wrappers are transparent by default.
Auto Trait Implementations§
impl !RefUnwindSafe for PullToRefresh
impl !UnwindSafe for PullToRefresh
impl Freeze for PullToRefresh
impl Send for PullToRefresh
impl Sync for PullToRefresh
impl Unpin for PullToRefresh
impl UnsafeUnpin for PullToRefresh
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
Source§impl<W> FocusApi for W
impl<W> FocusApi for W
Source§fn focus_node(self, node: FocusNode) -> WithFocus<Self>
fn focus_node(self, node: FocusNode) -> WithFocus<Self>
Attach a focus node. This enables focus-ring rendering and explicit
neighbor wiring.