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. GlassModalSheetController? controller,
  17. ValueChanged<GlassSheetState>? onStateChanged,
  18. GlassSheetMode mode = GlassSheetMode.dismissible,
  19. double peekSize = 90.0,
  20. GlassQuality? quality = GlassQuality.standard,
  21. bool platformViewBackdrop = false,
  22. double interactionScale = 1.01,
  23. bool enableInteractionGlow = true,
  24. bool enableSaturationGlow = true,
  25. LiquidGlassSettings? peekSettings,
  26. LiquidGlassSettings? halfSettings,
  27. LiquidGlassSettings? fullSettings,
  28. double stretch = 0.5,
  29. double resistance = 0.08,
  30. double snapThreshold = 0.4,
  31. double velocityThreshold = 700.0,
  32. GlassFillTransition fillTransition = GlassFillTransition.gradual,
  33. bool showDragIndicator = true,
  34. Color? dragIndicatorColor,
  35. double dragIndicatorWidth = 36,
  36. Color? glowColor,
  37. double glowRadius = 1.5,
  38. bool suppressInteractionOnChildren = false,
  39. EdgeInsetsGeometry? padding,
  40. bool enableTopFade = false,
  41. double topFadeHeight = 40.0,
  42. bool maintainContentGlass = true,
  43. LiquidGlassSettings? fullStateContentSettings,
  44. Set<GlassSheetDetent> detents = const {GlassSheetDetent.medium, GlassSheetDetent.large},
  45. bool dismissible = true,
  46. bool? enablePeek,
  47. double? peekHorizontalMargin,
  48. double? peekBottomMargin,
  49. double? peekWidth,
  50. double? peekTopBorderRadius,
  51. double? peekBottomRadius,
})

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).');