SolidScaffold class

Simplified unified scaffold component that automatically handles responsive layout switching.

Inheritance

Constructors

SolidScaffold({Key? key, List<SolidMenuItem>? menu, Widget? child, Widget? body, SolidScaffoldController? controller, Widget? bodyOverride, VoidCallback? onClearBodyOverride, PreferredSizeWidget? scaffoldAppBar, Widget? drawer, Widget? endDrawer, Widget? bottomNavigationBar, Widget? bottomSheet, List<Widget>? persistentFooterButtons, bool? resizeToAvoidBottomInset, dynamic appBar, SolidStatusBarConfig? statusBar, SolidNavUserInfo? userInfo, void onLogout(BuildContext)?, void onLogin(BuildContext)?, bool showLogout = true, bool showLogin = true, 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, bool rememberLastIndex = true, void onMenuSelected(int)?, int? selectedIndex, SolidThemeToggleConfig? themeToggle, SolidAboutConfig? aboutConfig, bool showNotifications = false, SolidInviteOthersConfig? inviteConfig, SolidFeedbackConfig? feedbackConfig, bool hideNavRail = false, bool enableProfile = true, bool enableOverflowMenu = true, bool bottomBarMenu = true})
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 child is null.
final
bodyOverride → Widget?
Optional body override for displaying subpages not in the menu.
final
bottomBarMenu → bool
On narrow screens, place main menu items in the bottom navigation bar instead of the hamburger drawer when true (the default).
final
bottomNavigationBar → Widget?
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 body parameter (Scaffold compatibility).
final
controller → SolidScaffoldController?
Optional controller for simplified subpage navigation management.
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
enableOverflowMenu → bool
Whether to enable the AppBar overflow menu (the three-dot menu).
final
enableProfile → bool
Whether to enable the POD-backed profile feature (avatar + display name). When true, the profile avatar and display name are shown in both the AppBar (right side) and the navigation drawer header. The avatar hosts a popup menu with Settings (which opens the profile editor) and Logout/Login, so the standalone AppBar Logout/Share buttons are suppressed in this mode. When false, the Logout button is rendered as the second-to-last AppBar action — immediately to the left of the About button. Profile data is automatically loaded from the POD on first build. Defaults to true.
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
feedbackConfig → SolidFeedbackConfig?
Optional Feedback configuration surfaced from the About dialog. When null, the About dialog still shows a Feedback placeholder (greyed out) so the layout is consistent and applications retain a clear integration point for a future feedback flow.
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
hideNavRail → bool
Option to force the navigation rail to be hidden.
final
initialIndex → int
Initial selected menu index.
final
inviteConfig → SolidInviteOthersConfig?
Optional Invite Others configuration. When provided, the "Invite Others" (Share) entry is surfaced from the About dialog. When enableProfile is false, the legacy behaviour is kept: an invite button is also added to the AppBar action list and the user can move it into the overflow menu via Layout Preferences.
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.
final
onDrawerChanged → DrawerCallback?
Callback when drawer is opened or closed.
final
onEndDrawerChanged → DrawerCallback?
Callback when end drawer is opened or closed.
final
onLogin → void Function(BuildContext)?
Optional custom login callback. If null, the built-in SolidAuthHandler.instance.handleLogin will be used. Provide this to navigate to your app's specific login page.
final
onLogout → void Function(BuildContext)?
Optional custom logout callback. If null and showLogout is true, the built-in SolidAuthHandler.instance.handleLogout will be used.
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
persistentFooterButtons → List<Widget>?
Standard Scaffold persistentFooterButtons for compatibility.
final
primary → bool
Whether this scaffold is being displayed at the top of the widget hierarchy.
final
rememberLastIndex → bool
When true (the default), the scaffold persists the currently selected menu index to shared_preferences and restores it on the next launch. Set to false to opt out and always start at initialIndex.
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.
final
selectedIndex → int?
Optional current selected index (for external state management).
final
showLogin → bool
Whether to show the login button in the app bar when logged out. Defaults to true. Set to false when the app uses a dedicated login screen (e.g. SolidLogin) and the app bar login button is unwanted.
final
showLogout → bool
Whether to show the logout button. Defaults to true. When true and onLogout is null, the built-in SolidAuthHandler.instance.handleLogout will be used automatically.
final
showNotifications → bool
Whether to show the notification button in the AppBar. Defaults to false. When true, a notification bell icon with an unread badge is displayed and tapping it opens the notification centre.
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