What is it? Opens a screen with an informed route and deletes all the navigation piles.
Your structure is represented by the attribute below:
Attribute | Type | Required | Definition |
---|---|---|---|
route | Route | ✓ | Navigation route. |
On the example below, three screens were used. The two first used PushView to add the screens to the piles and the last one uses ResetApplication and reopens the first screen.
You will need three endpoints to test:
Screen(
child = Container(
children = listOf(
Text(
"First Screen on Stack"
),
Button(
text = "Click me!",
onPress = listOf(
Navigate.PushView(
Route.Remote(
url = "secondScreenonStack.json"
)
)
)
)
)
)
)
Screen(
child = Container(
children = listOf(
Text(
"Second Screen on Stack"
),
Button(
text = "Click me!",
onPress = listOf(
Navigate.PushView(
Route.Remote(
url = "resetApplication.json"
)
)
)
)
)
)
)
Screen(
child = Container(
children = listOf(
Text(
"Third Screen on Stack"
),
Button(
text = "Click me to reset application",
onPress = listOf(
Navigate.ResetApplication(
route = Route.Remote("firstScreenonStack.json")
)
)
)
)
)
)
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.