FxShell class

Root layout for post-login home / dashboard / main flows.

Composes:

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

Constructors

FxShell({Key? key, required String initialPaneKey, List<FxPane>? dockPanes, List<FxPane>? drawerPanes, List<FxPane>? endDrawerPanes, Widget? bottomSheet, Widget? floatingActionButton, Widget bodyAnimationBuilder(Widget, Animation<double>)?, List<Widget>? persistentFooterButtons, FxShellStyle style = const FxShellStyle()})
const

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.spacer FxSite.spacer is 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.stickyBottom FxSite.stickyBottom is 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.stickyBottom FxSite.stickyBottom is 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
persistentFooterButtons → List<Widget>?
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