MonacoScaffold class
Drop-in `Scaffold` replacement that automatically protects common
static overlay slots from iframe-backed Monaco editors on Web.
On web, each of the floatingActionButton, drawer, endDrawer,
bottomSheet, bottomNavigationBar, and persistentFooterButtons
slots is wrapped in `MonacoOverlayBoundary` so pointer events land on
Flutter widgets instead of the editor iframe underneath. The appBar
is left alone by default (AppBars typically sit above the editor in the
layout, not over it); enable `shieldAppBar` for translucent /
extendBodyBehindAppBar layouts.
MonacoScaffold does NOT replace `MonacoFocusGuard`. Route overlays
(dialogs, popup menus, dropdown menus, modal bottom sheets) should still
be handled by `MonacoFocusGuard` + `MonacoRouteObserver`.
On native platforms, all overlay boundaries are no-op pass-throughs.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MonacoScaffold
Constructors
- MonacoScaffold({Key? key, PreferredSizeWidget? appBar, Widget? body, Widget? floatingActionButton, FloatingActionButtonLocation? floatingActionButtonLocation, FloatingActionButtonAnimator? floatingActionButtonAnimator, Widget? drawer, DrawerCallback? onDrawerChanged, Widget? endDrawer, DrawerCallback? onEndDrawerChanged, Widget? bottomSheet, Color? backgroundColor, bool? resizeToAvoidBottomInset, bool extendBody = false, bool extendBodyBehindAppBar = false, Color? drawerScrimColor, double? drawerEdgeDragWidth, bool drawerEnableOpenDragGesture = true, bool endDrawerEnableOpenDragGesture = true, String? restorationId, bool shieldStaticOverlays = true, bool shieldAppBar = false, bool overlayDebug = false})
-
Construct a Monaco-aware Scaffold. Every parameter except the three
at the end (
shieldStaticOverlays,shieldAppBar,overlayDebug) behaves identically to the corresponding Scaffold parameter.const
Properties
- appBar → PreferredSizeWidget?
-
See Scaffold.appBar.
final
- backgroundColor → Color?
-
See Scaffold.backgroundColor.
final
- body → Widget?
-
See Scaffold.body.
final
-
See Scaffold.bottomNavigationBar.
final
- bottomSheet → Widget?
-
See Scaffold.bottomSheet.
final
- drawer → Widget?
-
See Scaffold.drawer.
final
- drawerEdgeDragWidth → double?
-
See Scaffold.drawerEdgeDragWidth.
final
- drawerEnableOpenDragGesture → bool
-
See Scaffold.drawerEnableOpenDragGesture.
final
- drawerScrimColor → Color?
-
See Scaffold.drawerScrimColor.
final
- endDrawer → Widget?
-
See Scaffold.endDrawer.
final
- endDrawerEnableOpenDragGesture → bool
-
See Scaffold.endDrawerEnableOpenDragGesture.
final
- extendBody → bool
-
See Scaffold.extendBody.
final
- extendBodyBehindAppBar → bool
-
See Scaffold.extendBodyBehindAppBar.
final
- floatingActionButton → Widget?
-
See Scaffold.floatingActionButton.
final
- floatingActionButtonAnimator → FloatingActionButtonAnimator?
-
See Scaffold.floatingActionButtonAnimator.
final
- floatingActionButtonLocation → FloatingActionButtonLocation?
-
See Scaffold.floatingActionButtonLocation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onDrawerChanged → DrawerCallback?
-
See Scaffold.onDrawerChanged.
final
- onEndDrawerChanged → DrawerCallback?
-
See Scaffold.onEndDrawerChanged.
final
- overlayDebug → bool
-
Shows the web shield rectangles in translucent green for debugging.
final
-
See Scaffold.persistentFooterAlignment.
final
-
See Scaffold.persistentFooterButtons.
final
- resizeToAvoidBottomInset → bool?
-
See Scaffold.resizeToAvoidBottomInset.
final
- restorationId → String?
-
See Scaffold.restorationId.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shieldAppBar → bool
-
AppBars usually sit above the editor in the layout. Enable this for
translucent AppBars or
extendBodyBehindAppBar: truelayouts where the AppBar visually overlaps the editor.final - shieldStaticOverlays → bool
-
When false, this behaves like a plain Scaffold (no shielding).
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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