GlassScrollEdgeEffect constructor

const GlassScrollEdgeEffect({
  1. Key? key,
  2. required Widget child,
  3. double topFadeHeight = 100.0,
  4. double bottomFadeHeight = 60.0,
  5. bool fadeTop = true,
  6. bool fadeBottom = true,
  7. GlassScrollEdgeStyle style = GlassScrollEdgeStyle.soft,
  8. double maxSigma = 18.0,
  9. Color? fadeColor,
})

Creates a scroll edge effect that blurs or fades content at the edges.

When style is GlassScrollEdgeStyle.soft (default), the effect uses a gradient fade overlay, matching iOS 26's .scrollEdgeEffectStyle(.soft).

When style is GlassScrollEdgeStyle.blur, ProgressiveBlur is used to apply a hardware-accelerated progressive Gaussian frost to live content. This is a creative enhancement beyond the system default — opt in explicitly when you want a stronger frosted-glass look.

When style is GlassScrollEdgeStyle.hard, a crisp gradient cutoff is used, matching iOS 26's .scrollEdgeEffectStyle(.hard).

Implementation

const GlassScrollEdgeEffect({
  super.key,
  required this.child,
  this.topFadeHeight = 100.0,
  this.bottomFadeHeight = 60.0,
  this.fadeTop = true,
  this.fadeBottom = true,
  this.style = GlassScrollEdgeStyle.soft,
  this.maxSigma = 18.0,
  this.fadeColor,
});