pub struct ScaffoldFeatureController<T, U> {
pub close: VoidCallback,
pub set_state: Option<StateSetter>,
/* private fields */
}Expand description
An interface for controlling a feature of a Scaffold.
Commonly obtained from ScaffoldMessengerState::show_snack_bar or
ScaffoldState::show_bottom_sheet.
Dart compares controllers by identity; here they are shared as Rcs and compared with
Rc::ptr_eq.
Fields§
§close: VoidCallbackRemove the feature (e.g., bottom sheet, snack bar, or material banner) from the scaffold.
set_state: Option<StateSetter>Mark the feature (e.g., bottom sheet or snack bar) as needing to rebuild.
Implementations§
Source§impl<T: 'static, U: Clone + 'static> ScaffoldFeatureController<T, U>
impl<T: 'static, U: Clone + 'static> ScaffoldFeatureController<T, U>
Sourcepub fn closed(&self) -> CompleterFuture<U> ⓘ
pub fn closed(&self) -> CompleterFuture<U> ⓘ
Completes when the feature controlled by this object is no longer visible.
Trait Implementations§
Auto Trait Implementations§
impl<T, U> !RefUnwindSafe for ScaffoldFeatureController<T, U>
impl<T, U> !Send for ScaffoldFeatureController<T, U>
impl<T, U> !Sync for ScaffoldFeatureController<T, U>
impl<T, U> !UnwindSafe for ScaffoldFeatureController<T, U>
impl<T, U> Forget for ScaffoldFeatureController<T, U>
impl<T, U> Freeze for ScaffoldFeatureController<T, U>where
*const RcInner<dyn Widget> is !null: Freeze,
PhantomData<RcInner<dyn Widget>>: Freeze,
*const RcInner<Shared<U>> is !null: Freeze,
PhantomData<RcInner<Shared<U>>>: Freeze,
*const RcInner<dyn Fn(&mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze,
*const RcInner<dyn Fn(&mut App, &mut dyn FnMut(&mut App))> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, &mut dyn FnMut(&mut App))>>: Freeze,
PhantomData<T>: Freeze,
impl<T, U> Move for ScaffoldFeatureController<T, U>
impl<T, U> Unpin for ScaffoldFeatureController<T, U>
impl<T, U> UnsafeUnpin for ScaffoldFeatureController<T, U>where
*const RcInner<dyn Widget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Widget>>: UnsafeUnpin,
*const RcInner<Shared<U>> is !null: UnsafeUnpin,
PhantomData<RcInner<Shared<U>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, &mut dyn FnMut(&mut App))> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, &mut dyn FnMut(&mut App))>>: UnsafeUnpin,
PhantomData<T>: UnsafeUnpin,
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