pub struct ScaffoldView<State>where
State: 'static,{ /* private fields */ }Expand description
A declarative scaffold. See the module docs.
Implementations§
Source§impl<State> ScaffoldView<State>where
State: 'static,
impl<State> ScaffoldView<State>where
State: 'static,
Sourcepub fn app_bar(self, bar: AnyView<State>) -> ScaffoldView<State>
pub fn app_bar(self, bar: AnyView<State>) -> ScaffoldView<State>
Attach a top app bar. Self-sizes; see R-B4-inset.
Sourcepub fn app_bar_opt(self, bar: Option<AnyView<State>>) -> ScaffoldView<State>
pub fn app_bar_opt(self, bar: Option<AnyView<State>>) -> ScaffoldView<State>
Conditionally attach a top app bar — None clears it. The common
shape for chrome derived from route metadata that isn’t always
present.
Sourcepub fn bottom_bar(self, bar: AnyView<State>) -> ScaffoldView<State>
pub fn bottom_bar(self, bar: AnyView<State>) -> ScaffoldView<State>
Attach a bottom bar. Self-sizes for the bottom window inset the same
way app_bar self-sizes for the top one — see the module docs.
Sourcepub fn bottom_bar_opt(self, bar: Option<AnyView<State>>) -> ScaffoldView<State>
pub fn bottom_bar_opt(self, bar: Option<AnyView<State>>) -> ScaffoldView<State>
Conditionally attach a bottom bar — None clears it. Mirrors
ScaffoldView::app_bar_opt.
Sourcepub fn fab(self, fab: AnyView<State>) -> ScaffoldView<State>
pub fn fab(self, fab: AnyView<State>) -> ScaffoldView<State>
Attach a floating action button.
Sourcepub fn fab_margin(self, margin: f64) -> ScaffoldView<State>
pub fn fab_margin(self, margin: f64) -> ScaffoldView<State>
The FAB’s inset from every edge of its aligning box (default 16.0,
[DEFAULT_FAB_MARGIN]).
Sourcepub fn fab_alignment(self, alignment: Alignment) -> ScaffoldView<State>
pub fn fab_alignment(self, alignment: Alignment) -> ScaffoldView<State>
Where the FAB sits within its aligning box (default
Alignment::BOTTOM_RIGHT).
Sourcepub fn body_behind_app_bar(self, enabled: bool) -> ScaffoldView<State>
pub fn body_behind_app_bar(self, enabled: bool) -> ScaffoldView<State>
Body runs full-height under the bar (the bar floats). Default false
(Flutter’s extendBodyBehindAppBar, inverted default). Does not
affect bottom_bar — the body always stops above one when present;
v1 ships no matching extendBody toggle.
Sourcepub fn background(self, color: AlphaColor<Srgb>) -> ScaffoldView<State>
pub fn background(self, color: AlphaColor<Srgb>) -> ScaffoldView<State>
Optional flat fill painted behind every slot. No theme read — the
Scaffold stays theme-agnostic; a themed app supplies its own
Theme-resolved color.
Trait Implementations§
Source§impl<State> View<State> for ScaffoldView<State>where
State: 'static,
impl<State> View<State> for ScaffoldView<State>where
State: 'static,
Source§type Element = ScaffoldWidget
type Element = ScaffoldWidget
Source§fn build(&self, ctx: &mut BuildCtx<'_>) -> ScaffoldWidget
fn build(&self, ctx: &mut BuildCtx<'_>) -> ScaffoldWidget
Source§fn rebuild(
&self,
prev: &ScaffoldView<State>,
element: &mut ScaffoldWidget,
ctx: &mut BuildCtx<'_>,
) -> ChangeFlags
fn rebuild( &self, prev: &ScaffoldView<State>, element: &mut ScaffoldWidget, ctx: &mut BuildCtx<'_>, ) -> ChangeFlags
prev (the previous view of the same type) against the live
element, mutating it in place and reporting what changed.Auto Trait Implementations§
impl<State> !RefUnwindSafe for ScaffoldView<State>
impl<State> !Send for ScaffoldView<State>
impl<State> !Sync for ScaffoldView<State>
impl<State> !UnwindSafe for ScaffoldView<State>
impl<State> Freeze for ScaffoldView<State>
impl<State> Unpin for ScaffoldView<State>
impl<State> UnsafeUnpin for ScaffoldView<State>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.