GlassModalSheet constructor

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

Creates a new GlassModalSheet.

Implementation

const GlassModalSheet({
  super.key,
  required this.child,
  this.halfSize = 0.45,
  this.fullSize,
  this.initialState = GlassSheetState.half,
  this.topBorderRadius = 56,
  this.bottomBorderRadius,
  this.fullTopBorderRadius = 46,
  this.fullBottomBorderRadius,
  this.horizontalMargin = 5.0,
  this.bottomMargin = 6.0,
  this.fillThreshold = 0.60,
  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.settings,
  this.quality,
  this.platformViewBackdrop = false,
  this.expandedColor,
  this.controller,
  this.onStateChanged,
  this.mode = GlassSheetMode.dismissible,
  this.peekSize = 90.0,
  this.fillTransition = GlassFillTransition.instant,
  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.enablePeek,
  this.detents = const {GlassSheetDetent.medium, GlassSheetDetent.large},
  this.dismissible = true,
  this.peekHorizontalMargin,
  this.peekBottomMargin,
  this.peekWidth,
  this.peekTopBorderRadius,
  this.peekBottomRadius,
}) : assert(
          detents.length > 0,
          'GlassModalSheet needs at least one detent — add medium and/or large '
          '(small alone is a floor, not a resting height).');