How can I grab the `AnimatedContent` Scope that is...
# compose-android
m
How can I grab the
AnimatedContent
Scope that is used for navigation transitions between destinations? Context: I want to use shared element transitions to animate between elements in different screens(destinations) so, I want to pass the
AnimatedContentScope
down to all routes through
CompositionLocal
or should I basically wrap all of my destinations in an `AnimatedVisibility`/`AnimatedContent` . I don't want to do the latter as I want to take advantage of the scope that is already available for my navigation destinations
1
Nvm, Turns out it is exposed as a receiver from navigation compose
composable
fun while I'm using kiwi navigation
composable
one which doesn't expose it as a receiver
Also, I was able to find an issue opened about that already https://github.com/kiwicom/navigation-compose-typed/issues/137
s
Yup. The public functions of that library don't expose it, but if you go one layer deep you can do it yourself. That is still public API from kiwi there. And build your own `comosable`and
navigation
functions which expose the scope in some way. A composition local would work for example. The alternative is you can migrate to the new type-safe(ish) apis from the official library and you'd be fine like that too
m
Yes, as a temporary solution I'll just use your approach but eventually I know I'll migrate to the official way sometime in the near future
👍 1