I am trying to use navigator with compose by follo...
# compose
a
I am trying to use navigator with compose by following this code https://gist.github.com/lelandrichardson/5b70430ea383600eb0dba5a62172148c I am able to see one screen and go into second screen using below code.
Copy code
fun ScreenOne() {
    MaterialTheme {
        Column() {
            Greeting("Android One")
            val navigator = +ambient(Navigator)
            println(navigator.composeUiStack.size)
            Button(text = "Second", onClick = {navigator.navigate(
                DestinationBuilder(navigator, R.id.screenTwo, { ScreenTwo("1") })
                    .build()
                ,null, null, null) })
        }
    }
}

@Composable
fun ScreenTwo(id: String) {
    MaterialTheme {
        Greeting("Android Two")
    }
}
Now, When I press back it will not able navigate to screenOne What am I doing wrong ?