GlassModalSheetScaffold constructor
const
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,
- 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,
- 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? enablePeek,
- double? peekHorizontalMargin,
- double? peekBottomMargin,
- double? peekWidth,
- double? peekTopBorderRadius,
- double? peekBottomRadius,
Creates a GlassModalSheetScaffold.
Implementation
const GlassModalSheetScaffold({
super.key,
required this.body,
required this.sheet,
this.halfSize = 0.45,
this.fullSize,
this.initialState = GlassSheetState.half,
this.topBorderRadius,
this.bottomBorderRadius,
this.fullTopBorderRadius,
this.fullBottomBorderRadius,
this.horizontalMargin = 8.0,
this.bottomMargin = 8.0,
this.fillThreshold = 0.85,
this.settings,
this.expandedColor,
this.controller,
this.onStateChanged,
this.mode = GlassSheetMode.dismissible,
this.peekSize = 90.0,
this.quality = GlassQuality.standard,
this.platformViewBackdrop = false,
this.interactionScale = 1.01,
this.enableInteractionGlow = true,
this.enableSaturationGlow = true,
this.peekSettings,
this.halfSettings,
this.fullSettings,
this.stretch = 0.5,
this.resistance = 0.08,
this.snapThreshold = 0.4,
this.velocityThreshold = 700.0,
this.fillTransition = GlassFillTransition.gradual,
this.showDragIndicator = true,
this.dragIndicatorColor,
this.dragIndicatorWidth = 36,
this.glowColor,
this.glowRadius = 1.5,
this.suppressInteractionOnChildren = false,
this.padding,
this.enableTopFade = false,
this.topFadeHeight = 40.0,
this.maintainContentGlass = true,
this.fullStateContentSettings,
this.detents = const {GlassSheetDetent.medium, GlassSheetDetent.large},
this.dismissible = true,
this.enablePeek,
this.peekHorizontalMargin,
this.peekBottomMargin,
this.peekWidth,
this.peekTopBorderRadius,
this.peekBottomRadius,
}) : assert(
detents.length > 0,
'GlassModalSheetScaffold needs at least one detent — add medium '
'and/or large (small alone is a floor, not a resting height).');