chanjungskim
12/27/2022, 2:04 AManimatedDialog
. Is this normal way or does this have any problem or is there any better solution to solve this issue?
fun NavGraphBuilder.animatedDialog(
route: String,
arguments: List<NamedNavArgument> = emptyList(),
deepLinks: List<NavDeepLink> = emptyList(),
enter: EnterTransition = fadeIn() + expandIn(),
exit: ExitTransition = shrinkOut() + fadeOut(),
dialogProperties: DialogProperties = DialogProperties(),
content: @Composable (NavBackStackEntry) -> Unit
) {
addDestination(
Destination(
provider[AnimatedDialogNavigator::class],
enter = enter,
exit = exit,
dialogProperties,
content
).apply {
this.route = route
arguments.forEach { (argumentName, argument) ->
addArgument(argumentName, argument)
}
deepLinks.forEach { deepLink ->
addDeepLink(deepLink)
}
}
)
}