pub struct BottomSheetController { /* private fields */ }Expand description
Controller for bottom_sheet_provider, managing visibility and height.
This controller can be created by the application and passed through
bottom_sheet_provider().controller(...). It is used to control the
visibility and selected height of the sheet programmatically.
Implementations§
Source§impl BottomSheetController
impl BottomSheetController
Sourcepub fn open(&mut self)
pub fn open(&mut self)
Initiates the animation to open the bottom sheet.
If the sheet is already open, this has no effect. If the sheet is currently closing, it will reverse direction and start opening from its current position.
Sourcepub fn close(&mut self)
pub fn close(&mut self)
Initiates the animation to close the bottom sheet.
If the sheet is already closed, this has no effect. If the sheet is currently opening, it will reverse direction and start closing from its current position.
Sourcepub fn expansion(&self) -> BottomSheetExpansion
pub fn expansion(&self) -> BottomSheetExpansion
Returns the selected height anchor, including while the sheet is closed.
Sourcepub fn partially_expand(&mut self)
pub fn partially_expand(&mut self)
Selects the partial height without opening a closed sheet.
Sourcepub fn toggle_expansion(&mut self)
pub fn toggle_expansion(&mut self)
Switches between partial and expanded heights without changing visibility.
Sourcepub fn is_animating(&self) -> bool
pub fn is_animating(&self) -> bool
Returns whether the sheet is currently animating in either direction.
Trait Implementations§
Source§impl Clone for BottomSheetController
impl Clone for BottomSheetController
Source§fn clone(&self) -> BottomSheetController
fn clone(&self) -> BottomSheetController
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for BottomSheetController
impl Default for BottomSheetController
Source§impl PartialEq for BottomSheetController
impl PartialEq for BottomSheetController
impl StructuralPartialEq for BottomSheetController
Auto Trait Implementations§
impl Freeze for BottomSheetController
impl RefUnwindSafe for BottomSheetController
impl Send for BottomSheetController
impl Sync for BottomSheetController
impl Unpin for BottomSheetController
impl UnsafeUnpin for BottomSheetController
impl UnwindSafe for BottomSheetController
Blanket Implementations§
§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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.