voliveira
01/24/2025, 12:47 PMdata object ListDestination
data object FormDestination
//Target screen
data object DetailDestination
In case the navigation comes from ListDestination, I want to play a fade animation, and in case it comes from FormDestination, I want to play a slide animation.
Do you know the best way to check from where the navigation is coming from in the enterTransition callback from the composable method?
composable<DetailDestination>(
enterTransition = {
if (initialState.destination.route?.contains(ListDestination::class.simpleName)) {
// play fade
} else ....
// play slide
}
)
voliveira
01/24/2025, 12:47 PMvoliveira
01/24/2025, 5:07 PM