SolidScaffold class
Simplified unified scaffold component that automatically handles responsive layout switching.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SolidScaffold
Constructors
- SolidScaffold({Key? key, Widget? child, Widget? body, SolidScaffoldController? controller, Widget? bodyOverride, VoidCallback? onClearBodyOverride, PreferredSizeWidget? scaffoldAppBar, Widget? drawer, Widget? endDrawer, Widget? bottomSheet, bool? resizeToAvoidBottomInset, dynamic appBar, SolidStatusBarConfig? statusBar, SolidNavUserInfo? userInfo, void onLogout(BuildContext)?, void onShowAlert(BuildContext, String, String?)?, double narrowScreenThreshold = NavigationConstants.narrowScreenThreshold, Color? backgroundColor, Widget? floatingActionButton, FloatingActionButtonLocation? floatingActionButtonLocation, FloatingActionButtonAnimator? floatingActionButtonAnimator, DrawerCallback? onDrawerChanged, DrawerCallback? onEndDrawerChanged, bool primary = true, DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start, bool extendBody = false, bool extendBodyBehindAppBar = false, Color? drawerScrimColor, double? drawerEdgeDragWidth, bool drawerEnableOpenDragGesture = true, bool endDrawerEnableOpenDragGesture = true, String? restorationId, int initialIndex = 0, void onMenuSelected(int)?, int? selectedIndex, SolidThemeToggleConfig? themeToggle, SolidAboutConfig? aboutConfig, })
-
const
Properties
- aboutConfig → SolidAboutConfig?
-
Optional About dialogue configuration.
final
- appBar → dynamic
-
Optional AppBar configuration.
final
- backgroundColor → Color?
-
Background colour.
final
- body → Widget?
-
Standard Scaffold body parameter for compatibility.
Used when
childis null.final - bodyOverride → Widget?
-
Optional body override for displaying subpages not in the menu.
When provided, this takes precedence over menu-based navigation.
This is useful for navigating to detail pages (e.g. individual notes)
whilst maintaining the SolidScaffold frame (AppBar, navigation drawer).
final
-
Standard Scaffold bottomNavigationBar for compatibility.
final
- bottomSheet → Widget?
-
Standard Scaffold bottomSheet for compatibility.
final
- child → Widget?
-
Main content area for SolidUI layout.
If null, will use the
bodyparameter (Scaffold compatibility).final - controller → SolidScaffoldController?
-
Optional controller for simplified subpage navigation management.
When provided, handles all subpage state automatically.
Use
controller.navigateToSubpage(widget)to show a subpage.final - drawer → Widget?
-
Standard Scaffold drawer for compatibility.
final
- drawerDragStartBehavior → DragStartBehavior
-
Determines the way that drag start behaviour is handled for drawer.
final
- drawerEdgeDragWidth → double?
-
Width of the area within which a horizontal swipe will open the drawer.
final
- drawerEnableOpenDragGesture → bool
-
Whether the drawer can be opened with a drag gesture.
final
- drawerScrimColor → Color?
-
Colour to use for the scrim that obscures primary content while drawer is open.
final
- endDrawer → Widget?
-
Standard Scaffold endDrawer for compatibility.
final
- endDrawerEnableOpenDragGesture → bool
-
Whether the end drawer can be opened with a drag gesture.
final
- extendBody → bool
-
Whether the body should extend to the bottom of the scaffold.
final
- extendBodyBehindAppBar → bool
-
Whether the body should extend behind the app bar.
final
- floatingActionButton → Widget?
-
Floating action button.
final
- floatingActionButtonAnimator → FloatingActionButtonAnimator?
-
Animator for the floating action button.
final
- floatingActionButtonLocation → FloatingActionButtonLocation?
-
Location of the floating action button.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
Option to force the navigation rail to be hidden and display a
hamburger menu button instead.
final
- initialIndex → int
-
Initial selected menu index.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
List of menu items for SolidUI navigation.
If null, SolidScaffold behaves like a standard Scaffold.
final
- narrowScreenThreshold → double
-
Narrow screen threshold.
final
- onClearBodyOverride → VoidCallback?
-
Callback invoked when bodyOverride should be cleared.
Automatically called when a menu item is tapped whilst bodyOverride is
set. Use this to clear your subpage state:
setState(() => _subpage = null)final - onDrawerChanged → DrawerCallback?
-
Callback when drawer is opened or closed.
final
- onEndDrawerChanged → DrawerCallback?
-
Callback when end drawer is opened or closed.
final
- onLogout → void Function(BuildContext)?
-
Optional logout callback.
final
- onMenuSelected → void Function(int)?
-
Optional menu selection callback (for external state management).
final
- onShowAlert → void Function(BuildContext, String, String?)?
-
Optional alert dialogue callback.
final
-
Standard Scaffold persistentFooterButtons for compatibility.
final
- primary → bool
-
Whether this scaffold is being displayed at the top of the widget hierarchy.
final
- resizeToAvoidBottomInset → bool?
-
Standard Scaffold resizeToAvoidBottomInset for compatibility.
final
- restorationId → String?
-
Restoration ID to save and restore the state of the scaffold.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaffoldAppBar → PreferredSizeWidget?
-
Standard Scaffold appBar for compatibility.
Used when SolidUI
appBarconfig is null.final - selectedIndex → int?
-
Optional current selected index (for external state management).
final
- statusBar → SolidStatusBarConfig?
-
Optional status bar configuration.
final
- themeToggle → SolidThemeToggleConfig?
-
Optional theme toggle configuration.
final
- userInfo → SolidNavUserInfo?
-
Optional user information configuration.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SolidScaffold> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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