Skip to content

Commit

Permalink
Fix: Fix the QR scanner transition
Browse files Browse the repository at this point in the history
  • Loading branch information
Prakhar-Agarwal-byte committed Jul 19, 2023
1 parent b7efc68 commit a456175
Showing 1 changed file with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,33 @@ fun WalletNavigation(


// Send
val sendScreens: List<String> = listOf("qr_scan_screen")
composable(
route = Screen.SendScreen.route,
enterTransition = {
slideIntoContainer(AnimatedContentScope.SlideDirection.Up, animationSpec = tween(animationDuration))
when (initialState.destination.route) {
in sendScreens -> fadeIn(animationSpec = tween(400))
else -> slideIntoContainer(AnimatedContentScope.SlideDirection.Up, animationSpec = tween(animationDuration))
}
},
popEnterTransition = {
slideIntoContainer(AnimatedContentScope.SlideDirection.Up, animationSpec = tween(animationDuration))
when (initialState.destination.route) {
in sendScreens -> fadeIn(animationSpec = tween(400))
else -> slideIntoContainer(AnimatedContentScope.SlideDirection.Up, animationSpec = tween(animationDuration))
}
},
exitTransition = {
slideOutOfContainer(AnimatedContentScope.SlideDirection.Down, animationSpec = tween(animationDuration))
when (targetState.destination.route) {
in sendScreens -> fadeOut(animationSpec = tween(400))
else -> slideOutOfContainer(AnimatedContentScope.SlideDirection.Down, animationSpec = tween(animationDuration))
}
},
popExitTransition = {
slideOutOfContainer(AnimatedContentScope.SlideDirection.Down, animationSpec = tween(animationDuration))
}
when (targetState.destination.route) {
in sendScreens -> fadeOut(animationSpec = tween(400))
else -> slideOutOfContainer(AnimatedContentScope.SlideDirection.Down, animationSpec = tween(animationDuration))
}
},
) { SendScreen(navController = navControllerWalletNavigation, walletViewModel = walletViewModel) }


Expand Down

0 comments on commit a456175

Please sign in to comment.