Angga Ardinata
09/13/2023, 9:55 PMBox(modifier = Modifier.fillMaxSize()) {
Navigator(
listOf(
SplashScreen
)
) { navigator ->
DeeplinkHandler(navigator)
val animationSpec = spring(
stiffness = 300f,
visibilityThreshold = IntOffset.VisibilityThreshold
)
ScreenTransition(
navigator = navigator,
transition = {
val (initialOffset, targetOffset) = when (navigator.lastEvent) {
StackEvent.Pop -> ({ size: Int -> -size }) to ({ size: Int -> size / 2 })
else -> ({ size: Int -> size }) to ({ size: Int -> -size / 2 })
}
ContentTransform(
slideInHorizontally(animationSpec, initialOffset),
slideOutHorizontally(animationSpec, targetOffset)
)
}
)
}
}
It's almost as expected .. except the previouse screen become at the top of popped screen
any help appreciated