Documentation Index
Fetch the complete documentation index at: https://synapsync.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
NbxScaffold provides a consistent layout structure for Nebux applications with enhanced functionality including configurable app bars, safe areas, body decoration, and double-back-to-exit behavior.
Basic Usage
Widget Properties
Required Properties
The main content widget to be displayed in the scaffold body.
Name of the widget to be used for debugging purposes.
App Bar Properties
Custom app bar widget. If provided, overrides the built-in app bar.
Configuration for the built-in app bar properties. The app bar is only shown if this is provided and contains at least a title, actions, or leading button.
Layout Properties
Configuration for safe area properties (top, bottom, minimum padding).
Configuration for body properties including container wrapping, decoration, and resize behavior.
Background color for the scaffold. Defaults to
context.nebuxColors.background.Gradient or decoration for the scaffold background.
Navigation Properties
Bottom navigation bar widget.
Floating action button widget.
Location of the floating action button.
Configuration Classes
AppBarConfig
Configuration for the built-in app bar.Title text to display in the app bar.
Action widgets to display in the app bar.
Custom leading button widget for the app bar.
Whether to center the title in the app bar.
Whether to show a divider below the app bar.
Thickness of the divider below the app bar.
Background color for the app bar.
SafeAreaConfig
Configuration for safe area behavior.Whether to apply safe area to the top of the screen.
Whether to apply safe area to the bottom of the screen.
Minimum padding for the safe area.
BodyConfig
Configuration for scaffold body behavior.Whether to wrap the body in a container with decoration and horizontal padding.
Decoration to apply to the body container when
wrapInContainer is true.Whether the body should resize to avoid the bottom inset (keyboard).
Message to display when double back to exit is triggered. If provided, enables double-back-to-exit behavior.
Whether the body should extend behind the app bar.
Examples
Basic Scaffold
With App Bar
With Custom Leading Button
Without Container Wrapper
With Double Back to Exit
With Bottom Navigation
With Floating Action Button
With Gradient Background
With Keyboard Resize
Custom Safe Area
With Custom App Bar Widget
Behavior Notes
App Bar Display
The built-in app bar is only displayed ifappBarConfig is provided and contains at least one of:
titleactionsleadingButton
Body Container
WhenbodyConfig.wrapInContainer is true (default), the body is wrapped in a container with:
- Horizontal padding of
defaultPaddingSize - Optional decoration from
bodyConfig.decoration
Default Padding
The default horizontal padding is controlled bydefaultPaddingSize constant from the design system.
See Also
- NbxAppBar - Custom app bar implementation
- Scaffold params - Configuration classes