GlassModalSheetScaffold class

A convenience scaffold that layers a GlassModalSheet over a body widget.

Composes the sheet and its underlying content (e.g. a map, a photo grid) into a single widget. Use GlassModalSheetScaffold when you want a self-contained sheet + content stack without managing the Stack yourself.

If you need finer control \u2014 e.g. the sheet sits inside an existing Stack or its overlay is managed externally \u2014 use GlassModalSheet directly.

Inheritance
Available extensions

Constructors

GlassModalSheetScaffold({Key? key, required Widget body, required Widget sheet, double halfSize = 0.45, double? fullSize, GlassSheetState initialState = GlassSheetState.half, double? topBorderRadius, double? bottomBorderRadius, double? fullTopBorderRadius, double? fullBottomBorderRadius, double horizontalMargin = 8.0, double bottomMargin = 8.0, double fillThreshold = 0.85, LiquidGlassSettings? settings, Color? expandedColor, Color? expandedDarkColor, GlassModalSheetController? controller, ValueChanged<GlassSheetState>? onStateChanged, GlassSheetMode mode = GlassSheetMode.dismissible, double peekSize = 90.0, GlassQuality? quality = GlassQuality.standard, bool platformViewBackdrop = false, double interactionScale = 1.01, bool enableInteractionGlow = true, bool enableSaturationGlow = true, LiquidGlassSettings? peekSettings, LiquidGlassSettings? halfSettings, LiquidGlassSettings? fullSettings, double stretch = 0.5, double resistance = 0.08, double snapThreshold = 0.4, double velocityThreshold = 700.0, GlassFillTransition fillTransition = GlassFillTransition.gradual, bool showDragIndicator = true, Color? dragIndicatorColor, double dragIndicatorWidth = 36, double dragIndicatorHeight = 4, double dragIndicatorTopPadding = 8, Color? glowColor, double glowRadius = 1.5, bool suppressInteractionOnChildren = false, EdgeInsetsGeometry? padding, bool enableTopFade = false, double topFadeHeight = 40.0, bool maintainContentGlass = true, LiquidGlassSettings? fullStateContentSettings, Set<GlassSheetDetent> detents = const {GlassSheetDetent.medium, GlassSheetDetent.large}, bool dismissible = true, bool barrierDismissible = true, double? peekHorizontalMargin, double? peekBottomMargin, double? peekWidth, double? peekTopBorderRadius, double? peekBottomRadius, GlassSheetPlacement placement = GlassSheetPlacement.automatic})
Creates a GlassModalSheetScaffold.
const

Properties

barrierDismissible → bool
Whether a tap on body outside the sheet dismisses it, as a modal barrier's would. Applies only in GlassSheetMode.dismissible; the swipe is dismissible's. Default: true.
final
body → Widget
Body widget (e.g., a map or a list) that stays under the sheet.
final
bottomBorderRadius → double?
Corner radius of the bottom edges in its floating state.
final
bottomMargin → double
Bottom padding from the screen edge.
final
controller → GlassModalSheetController?
Controller for programmatic sheet control.
final
detents → Set<GlassSheetDetent>
The resting detents offered (small = peek floor, medium = half glass, large = full opaque). Must be non-empty. Forwarded to the sheet.
final
dismissible → bool
Whether the sheet can be swiped down to dismiss. When false the sheet rubber-bands at its lowest detent instead. Forwarded to the sheet.
final
dragIndicatorColor → Color?
Custom color for the drag handle.
final
dragIndicatorHeight → double
Thickness of the drag handle pill in logical pixels. Defaults to 4.
final
dragIndicatorTopPadding → double
Gap between the sheet's top edge and the drag handle pill. Defaults to 8.
final
dragIndicatorWidth → double
Width of the drag handle pill in logical pixels. Defaults to 36 (iOS native). Bump higher (e.g. 64) for sheets where the handle reads as the primary affordance and the thinner default feels too subtle relative to the rest of the sheet's content.
final
enableInteractionGlow → bool
Whether to show glow/glare on touch for tactile feedback. Default: true.
final
enableSaturationGlow → bool
Whether to pulse saturation/lighting of the whole sheet on touch. Default: true.
final
enableTopFade → bool
Whether to enable a gradient fade effect at the top.
final
expandedColor → Color?
Background color used when the sheet is fully expanded and opaque.
final
expandedDarkColor → Color?
expandedColor while the glass brightness is dark.
final
fillThreshold → double
Threshold (0.0 - 1.0) at which the sheet starts turning into a solid color.
final
fillTransition → GlassFillTransition
Color/Saturation transition mode when expanding to full.
final
fullBottomBorderRadius → double?
Corner radius of the bottom edges when fully expanded.
final
fullSettings → LiquidGlassSettings?
The settings applied when the sheet is fully expanded.
final
fullSize → double?
Maximum sheet height in 'full' state. If null, defaults to screen height minus 90px.
final
fullStateContentSettings → LiquidGlassSettings?
Custom glass settings for content specifically for the 'full' state.
final
fullTopBorderRadius → double?
Corner radius of the top edges when fully expanded.
final
glowColor → Color?
Custom color for the touch interaction glow.
final
glowRadius → double
Radius of the touch interaction glow. Default: 1.5.
final
halfSettings → LiquidGlassSettings?
The settings applied when the sheet is at its half-height detent.
final
halfSize → double
Height in the 'half' state (0.0 - 1.0 fraction or absolute pixels). Default: 0.45.
final
hashCode → int
The hash code for this object.
no setterinherited
horizontalMargin → double
Horizontal padding between the sheet and the screen edges.
final
initialState → GlassSheetState
Initial state when the scaffold is first displayed.
final
interactionScale → double
Scale factor applied during interaction for tactile feedback. Default: 1.01.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maintainContentGlass → bool
Whether to maintain high glass vibrancy for content even when the sheet is solid (full state).
final
mode → GlassSheetMode
Interaction mode (dismissible vs persistent). Default: GlassSheetMode.dismissible.
final
onStateChanged → ValueChanged<GlassSheetState>?
Callback triggered when the sheet snaps to a new state.
final
padding → EdgeInsetsGeometry?
Internal padding for the sheet content.
final
peekBottomMargin → double?
Bottom padding specifically for the 'peek' state.
final
peekBottomRadius → double?
Corner radius for 'peek' state.
final
peekHorizontalMargin → double?
Horizontal padding specifically for the 'peek' state.
final
peekSettings → LiquidGlassSettings?
Optional state-specific settings that override the base settings.
final
peekSize → double
Minimum visible height in the 'peek' state.
final
peekTopBorderRadius → double?
Corner radius for 'peek' state.
final
peekWidth → double?
Fixed width for the 'peek' state.
final
placement → GlassSheetPlacement
Where the sheet sits across a screen with room beside it.
final
platformViewBackdrop → bool
Forces the BackdropFilter fallback so premium glass renders cleanly over an iOS PlatformView. Forwarded to the sheet's AdaptiveGlass.
final
quality → GlassQuality?
Rendering quality (BackdropFilter vs Shader). Defaults to standard.
final
resistance → double
Resistance factor when dragging beyond bounds. Default: 0.08.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
settings → LiquidGlassSettings?
Glass morphism effect settings (blur, thickness, lighting).
final
sheet → Widget
Sheet widget displayed inside the glass sheet.
final
showDragIndicator → bool
Whether to show the iOS-style drag handle at the top. Default: true.
final
snapThreshold → double
Snap progress threshold (0.0 - 1.0). Default: 0.4.
final
stretch → double
Liquid stretch multiplier for over-scroll/drag effects. Default: 0.5.
final
suppressInteractionOnChildren → bool
Whether to prevent sheet scaling when interacting with children. Default: false.
final
topBorderRadius → double?
Corner radius of the top edges in its floating state.
final
topFadeHeight → double
Height of the top fade effect.
final
velocityThreshold → double
Velocity threshold for flick gestures (pixels/sec). Default: 700.0.
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
glassContextMenu({Key? key, required List<Widget> actions, WidgetBuilder? previewBuilder, bool enabled = true, bool enableHaptics = true, double borderRadius = 32.0, double? previewBorderRadius, double rowBorderRadius = 16.0, BorderRadius? rowCorners, Color? originSlotColor, Color? backgroundColor, LiquidGlassSettings? settings, GlassQuality? quality, double backdropBlur = 0.0, Color? barrierColor, double menuWidth = 250.0, VoidCallback? onOpened, VoidCallback? onDismissed, Duration longPressDuration = const Duration(milliseconds: 700)}) → Widget

Available on Widget, provided by the GlassContextMenuExtension extension

Wraps this widget in a GlassContextMenu displaying actions on long-press or right-click.
glassFullScreenCover({required bool isPresented, VoidCallback? onDismiss, required WidgetBuilder content, bool enableSwipeToDismiss = true, double dismissThreshold = 140.0, LiquidGlassSettings? settings, GlassQuality? quality}) → Widget

Available on Widget, provided by the GlassFullScreenCoverExtension extension

Presents a full-viewport modal cover whenever isPresented is true.

Available on Widget, provided by the GlassNavigationTitleExtension extension

Annotates this widget with a navigation title that drives enclosing or descendant GlassAppBar / GlassAppBar.pinned bars (when their explicit title is null) as well as header accessibility semantics.
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