I am learning KMM and come across an issue on how to use local function variable for expect/actual functions. Using expect and actual function I would like to do something with compose navigation in Android like below:
commonMain
expect fun navigateToSignInEmail()
androidMain
actual fun navigateToSignInEmail() {
navHostController.navigate("ViewSignInEmail")
}
However, since navHostController cannot be declared on global and had to pass around using function, is there a way I can use it as above to provide navigation function? I do not want to pass the whole navHostController as my iOS app would be using something different for navigation.
Thanks for help!