pub struct SliverPersistentHeaderDelegate<F> {
pub min_extent: f64,
pub max_extent: f64,
pub build: F,
}Expand description
What a sliver_persistent_header shows: its extent range and how to
build its content for a shrink offset — Flutter’s
SliverPersistentHeaderDelegate.
build(shrink_offset, overlaps_content) receives how far the header has
shrunk from max_extent (0 fully expanded, up to max_extent) and
whether content is scrolling under it. An extent that is NaN, infinite or
negative is treated as 0.0, and a max_extent below min_extent as
min_extent.
Fields§
§min_extent: f64The smallest extent the header shrinks to along the scroll axis.
max_extent: f64The extent of the fully expanded header along the scroll axis — also how much the header scrolls.
build: FBuilds the header’s content for a shrink offset; see the type docs.
Implementations§
Auto Trait Implementations§
impl<F> Freeze for SliverPersistentHeaderDelegate<F>where
F: Freeze,
impl<F> RefUnwindSafe for SliverPersistentHeaderDelegate<F>where
F: RefUnwindSafe,
impl<F> Send for SliverPersistentHeaderDelegate<F>where
F: Send,
impl<F> Sync for SliverPersistentHeaderDelegate<F>where
F: Sync,
impl<F> Unpin for SliverPersistentHeaderDelegate<F>where
F: Unpin,
impl<F> UnsafeUnpin for SliverPersistentHeaderDelegate<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for SliverPersistentHeaderDelegate<F>where
F: UnwindSafe,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.