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

Add onCollapse callback #28

Closed
wants to merge 3 commits into from
Closed

Conversation

lohanbodevan
Copy link

First of all, congrats, this widget works pretty good.
Using it i had the need to execute some tasks after the bottom sheet collapse and i thought this could be useful for someone else too. So i added this optional callback: onCollapse.

Situations that can be useful
If your bottom sheet content has managed data or if you need to update some state on the parent widget, is good to know when the bottom sheet is collapsed.

If is necessary to run an action after the bottomsheet collapse, the
onCollapse callback can be useful
* Update LICENSE

* removed logging

* Added force scroll

* Fixed first scroll
@mcrovero
Copy link
Owner

Hi, that's a good point but looking at the changes I see that the onCollapse is called only after collapse() and not if the user manually collapses the bottomsheet.
What about listening for animationState changes?

@lohanbodevan
Copy link
Author

Your are completely right @mcrovero. I guess i didn't see this animationState before. Thank you for the hint.

@sooxt98
Copy link

sooxt98 commented Jan 15, 2020

@lohanbodevan this pull shouldn't be close. #55

@lohanbodevan
Copy link
Author

Hi @sooxt98 i will be glad to reopen and work on it if it still makes sense with the widget roadmap. What do you say @mcrovero ?

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

Successfully merging this pull request may close these issues.

None yet

3 participants