header property
A fixed header widget positioned below the status bar that fades out as the user scrolls.
Use this for iOS-style large title headers (e.g. Apple Music's "Listen Now") that are not part of the scroll view but fade to transparent as content scrolls up.
Requires headerScrollController to drive the fade animation.
The fade is computed as 1.0 - (scrollOffset / headerFadeDistance).
GlassScaffold(
header: Text('Listen Now', style: largeTitle),
headerScrollController: _scrollController,
headerFadeDistance: 60.0,
body: CustomScrollView(
controller: _scrollController,
slivers: [...],
),
)
Implementation
final Widget? header;