Skip to content

GlassHeader

GlassHeader renders a frosted-glass panel that slides in from the top of the scroll view. It uses BackdropFilter to blur the content behind it, producing a modern glassmorphism effect that works especially well on image-heavy backgrounds.


SmartRefresher(
controller: _controller,
header: const GlassHeader(),
onRefresh: _onRefresh,
child: ListView.builder(...),
)

PropertyTypeDefaultDescription
blurXdouble10.0Horizontal Gaussian blur radius for the backdrop.
blurYdouble10.0Vertical Gaussian blur radius for the backdrop.
colorColorColors.white30Fill color of the glass panel (use a semi-transparent color).
progressIndicatorColorColorColors.whiteColor of the CircularProgressIndicator shown during refresh.
childWidget?nullCustom child placed inside the glass panel.
heightdouble60.0Height reserved for the header.
completeDurationDuration600msTime the complete state is shown.

GlassHeader(
blurX: 12.0,
blurY: 12.0,
color: Colors.white.withOpacity(0.15),
progressIndicatorColor: Colors.white,
)
GlassHeader(
blurX: 20.0,
blurY: 20.0,
color: Colors.black.withOpacity(0.2),
progressIndicatorColor: Colors.white70,
)
GlassHeader(
color: Colors.white.withOpacity(0.2),
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.refresh, color: Colors.white),
SizedBox(width: 10),
Text('Refreshing…', style: TextStyle(color: Colors.white)),
],
),
)