GlassModalSheetScaffold constructor

const GlassModalSheetScaffold({
  1. Key? key,
  2. required Widget body,
  3. required Widget sheet,
  4. double halfSize = 0.45,
  5. double? fullSize,
  6. GlassSheetState initialState = GlassSheetState.half,
  7. double? topBorderRadius,
  8. double? bottomBorderRadius,
  9. double? fullTopBorderRadius,
  10. double? fullBottomBorderRadius,
  11. double horizontalMargin = 8.0,
  12. double bottomMargin = 8.0,
  13. double fillThreshold = 0.85,
  14. LiquidGlassSettings? settings,
  15. Color? expandedColor,
  16. Color? expandedDarkColor,
  17. GlassModalSheetController? controller,
  18. ValueChanged<GlassSheetState>? onStateChanged,
  19. GlassSheetMode mode = GlassSheetMode.dismissible,
  20. double peekSize = 90.0,
  21. GlassQuality? quality = GlassQuality.standard,
  22. bool platformViewBackdrop = false,
  23. double interactionScale = 1.01,
  24. bool enableInteractionGlow = true,
  25. bool enableSaturationGlow = true,
  26. LiquidGlassSettings? peekSettings,
  27. LiquidGlassSettings? halfSettings,
  28. LiquidGlassSettings? fullSettings,
  29. double stretch = 0.5,
  30. double resistance = 0.08,
  31. double snapThreshold = 0.4,
  32. double velocityThreshold = 700.0,
  33. GlassFillTransition fillTransition = GlassFillTransition.gradual,
  34. bool showDragIndicator = true,
  35. Color? dragIndicatorColor,
  36. double dragIndicatorWidth = 36,
  37. double dragIndicatorHeight = 4,
  38. double dragIndicatorTopPadding = 8,
  39. Color? glowColor,
  40. double glowRadius = 1.5,
  41. bool suppressInteractionOnChildren = false,
  42. EdgeInsetsGeometry? padding,
  43. bool enableTopFade = false,
  44. double topFadeHeight = 40.0,
  45. bool maintainContentGlass = true,
  46. LiquidGlassSettings? fullStateContentSettings,
  47. Set<GlassSheetDetent> detents = const {GlassSheetDetent.medium, GlassSheetDetent.large},
  48. bool dismissible = true,
  49. bool barrierDismissible = true,
  50. double? peekHorizontalMargin,
  51. double? peekBottomMargin,
  52. double? peekWidth,
  53. double? peekTopBorderRadius,
  54. double? peekBottomRadius,
  55. GlassSheetPlacement placement = GlassSheetPlacement.automatic,
})

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.expandedDarkColor,
  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.dragIndicatorHeight = 4,
  this.dragIndicatorTopPadding = 8,
  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.barrierDismissible = true,
  this.peekHorizontalMargin,
  this.peekBottomMargin,
  this.peekWidth,
  this.peekTopBorderRadius,
  this.peekBottomRadius,
  this.placement = GlassSheetPlacement.automatic,
}) : assert(
          detents.length > 0,
          'GlassModalSheetScaffold needs at least one detent — add medium '
          'and/or large (small alone is a floor, not a resting height).');