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

Use LocalProvider for emptyStackAnimation #570

Closed
LionZXY opened this issue Dec 12, 2023 · 1 comment
Closed

Use LocalProvider for emptyStackAnimation #570

LionZXY opened this issue Dec 12, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@LionZXY
Copy link
Contributor

LionZXY commented Dec 12, 2023

Right now you can do nested Children graphs in Compose, but then you have to manually set things like animation: StackAnimation

I think this is wrong, I think instead of a hardcoded parameter should use LocalProvider:

val LocalStackAnimation = compositionLocalOf<StackAnimation<Any, Any>> { EmptyStackAnimation() }

And instead of emptyStackAnimation() call LocalStackAnimation.current

@arkivanov
Copy link
Owner

Thanks for the idea! I have thought about it, I think we can add it. Also thanks for the PR, I have left some comments.

@arkivanov arkivanov added the enhancement New feature or request label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants