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

Is there any similar feature to SliverAppBar's snap? #14

Open
2coo opened this issue Nov 22, 2023 · 5 comments
Open

Is there any similar feature to SliverAppBar's snap? #14

2coo opened this issue Nov 22, 2023 · 5 comments
Labels
question Further information is requested

Comments

@2coo
Copy link

2coo commented Nov 22, 2023

I am trying to build the AppBar like this. Any possible way to do that?

output.mp4
@tenhobi
Copy link
Member

tenhobi commented Nov 23, 2023

Hey @giva9712, it seems I can play the video neither on a desktop nor mobile. Could you please check you uploaded the correct thing?

@tenhobi tenhobi added the question Further information is requested label Nov 23, 2023
@2coo
Copy link
Author

2coo commented Nov 24, 2023

I uploaded it into free video hosting but it will expire in 2 days.

https://staging.streamable.com/gkfdx2

@tenhobi
Copy link
Member

tenhobi commented Nov 24, 2023

I see now. Hmm, I think something similar should be possible, since you can build anything based on values provided through the builder. Maybe you could also add floating to that, so it works even when scrolling down a lot.

Try a lot of different options in here https://netglade.github.io/sliver_app_bar_builder

@2coo
Copy link
Author

2coo commented Nov 24, 2023

@tenhobi,

I like SliverAppBarBuilder than SliverAppBar because it saves more boilerplate for animating.

But I need to collapse the SliverAppBarBuilder height to the given barHeight if the parent SingleChildScrollView scroll position is greater than some X value. If less than X, expand the SliverBarBuilder to the given contentHeight.

Put simply, any similar feature like SliverAppBar's snap: true?

@tenhobi
Copy link
Member

tenhobi commented Nov 24, 2023

Not at the moment. :/

I did some research and I have found this which has some gifs showing the difference. https://api.flutter.dev/flutter/material/SliverAppBar/snap.html

Wince we use SliverPersistentHeaderDelegate underhood, which has something called "snap configuration" there https://api.flutter.dev/flutter/widgets/SliverPersistentHeaderDelegate/snapConfiguration.html, couldn't that be the thing to play around with to make such an effect?

Would you want to try and create a pull request for that? (I know for sure I will not have a time for trying to create that this year for sure.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants