Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
interface Navigator {
val navActions: StateFlow<NavigationAction?>
fun navigate(navAction: NavigationAction?)
class ComposeCustomNavigator : Navigator {
private val _navActions: MutableStateFlow<NavigationAction?> by lazy {
override val navActions = _navActions.asStateFlow()
override fun navigate(navAction: NavigationAction?) {
_navActions.update { navAction }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment