Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SliverPinnedHeader and detecting overlapping (i.e. overlapsContent) #72

Open
TyBarthel opened this issue Apr 20, 2023 · 1 comment
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@TyBarthel
Copy link

TyBarthel commented Apr 20, 2023

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.

@sunguard
Copy link

@TyBarthel You can use SliverLayoutBuilder to achieve it.

SliverLayoutBuilder(
  builder: (_, SliverConstraints constraints) {
    return SliverPinnedHeader(
      child: Text('Is overlapped? ${constraints.overlap > 0}'),
    );
  },
),

@Kavantix Kavantix added enhancement New feature or request good first issue Good for newcomers labels Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants