FxShell class
Root layout for post-login home / dashboard / main flows.
Composes:
- FxScaffold (outer scaffold)
- Optional shared FxAppBar per FxPane.showAppBar
- FxDock bottom bar (FxSite.dock)
- FxDrawer / end drawer (FxSite.drawer, FxSite.endDrawer)
- Body: active FxPane.builder, switched with AnimatedSwitcher
State lives in fxShellCtrlProvider (FxShellCtrl). Panes are synced after
the first frame so Riverpod is not written during build.
Nested scaffolds
If a pane uses its own Scaffold + AppBar, set FxPane.showAppBar to
false for that pane. The shell then sets primary: false on the outer
FxScaffold so the inner app bar receives correct status-bar padding.
Example
FxShell(
initialPaneKey: 'home',
panes: [
FxPane(
key: 'home',
title: 'Home',
icon: FxPaneState.onlyActive(Icons.home),
sites: const [FxSite.dock],
builder: (_) => const HomeTab(),
),
FxPane(
key: 'settings',
title: 'Settings',
showAppBar: false,
builder: (_) => SettingsScaffold(), // owns its own AppBar
),
],
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FxShell
Constructors
Properties
-
bodyAnimationBuilder
→ Widget Function(Widget, Animation<
double> )? -
Animation builder for the body.
final
- bottomSheet → Widget?
-
final
-
dockPanes
→ List<
FxPane> ? -
Panes for the dock. FxSite.dock and
FxSite.spacerFxSite.spaceris used as a vertical gap in a dock. It is used to separate the panes in a dock.final -
drawerPanes
→ List<
FxPane> ? -
Panes for the drawer. FxSite.drawer and
FxSite.stickyBottomFxSite.stickyBottomis used as the last item in a drawer or end drawer list. It appears above the footer in a drawer or end drawer list.final -
endDrawerPanes
→ List<
FxPane> ? -
Panes for the end drawer. FxSite.endDrawer and
FxSite.stickyBottomFxSite.stickyBottomis used as the last item in a drawer or end drawer list. It appears above the footer in a drawer or end drawer list.final - floatingActionButton → Widget?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialPaneKey → String
-
FxPane.key to select on first sync.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → FxShellStyle
-
Shared app bar styling when FxPane.showAppBar is true.
final
Methods
-
createElement(
) → ConsumerStatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → ConsumerState< FxShell> - Creates the mutable state for this widget at a given location in the tree.
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited