sliver_tools
sliver_tools copied to clipboard
SliverPinnedHeader and detecting overlapping (i.e. overlapsContent)
Is there a way to detect the overlapping content using a SliverPinnedHeader
like you can do with a SliverPersistentHeaderDelegate
? I'm ultimately looking to change the background of the SliverPinnedHeader when content overlaps.
@TyBarthel You can use SliverLayoutBuilder to achieve it.
SliverLayoutBuilder(
builder: (_, SliverConstraints constraints) {
return SliverPinnedHeader(
child: Text('Is overlapped? ${constraints.overlap > 0}'),
);
},
),