pub struct ScaffoldView<State: 'static> { /* private fields */ }Expand description
A declarative scaffold. See the module docs.
Implementations§
Source§impl<State: 'static> ScaffoldView<State>
impl<State: 'static> ScaffoldView<State>
Sourcepub fn app_bar(self, bar: AnyView<State>) -> Self
pub fn app_bar(self, bar: AnyView<State>) -> Self
Attach a top app bar. Self-sizes; see R-B4-inset.
Sourcepub fn app_bar_opt(self, bar: Option<AnyView<State>>) -> Self
pub fn app_bar_opt(self, bar: Option<AnyView<State>>) -> Self
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>) -> Self
pub fn bottom_bar(self, bar: AnyView<State>) -> Self
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>>) -> Self
pub fn bottom_bar_opt(self, bar: Option<AnyView<State>>) -> Self
Conditionally attach a bottom bar — None clears it. Mirrors
ScaffoldView::app_bar_opt.
Sourcepub fn fab_margin(self, margin: f64) -> Self
pub fn fab_margin(self, margin: f64) -> Self
The FAB’s inset from every edge of its aligning box (default 16.0,
[DEFAULT_FAB_MARGIN]).
Sourcepub fn fab_alignment(self, alignment: Alignment) -> Self
pub fn fab_alignment(self, alignment: Alignment) -> Self
Where the FAB sits within its aligning box (default
Alignment::BOTTOM_RIGHT).
Sourcepub fn body_behind_app_bar(self, enabled: bool) -> Self
pub fn body_behind_app_bar(self, enabled: bool) -> Self
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: Color) -> Self
pub fn background(self, color: Color) -> Self
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: 'static> View<State> for ScaffoldView<State>
impl<State: 'static> View<State> for ScaffoldView<State>
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: &Self,
element: &mut ScaffoldWidget,
ctx: &mut BuildCtx<'_>,
) -> ChangeFlags
fn rebuild( &self, prev: &Self, 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.