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. Color? fadeColor,
})

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

When used inside a GlassPage with a background widget, the fade automatically uses the page's background texture for a pixel-perfect effect. No fadeColor is needed.

When used outside GlassPage, provide fadeColor to match your background, or let it default to the scaffold background colour.

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.fadeColor,
});