What is it? Opens a screen with an informed route of a new flow and cleans the pile of previous loaded screens.
Your structure is represented by the attribute below:
Attribute | Type | Required | Definition |
---|---|---|---|
route | Route | ✓ | Navigation route. |
controllerId | String | The navigation controller id to be used during the navigation action, If missing, the default navigation controller will be used instead. |
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 ResetStack 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 = "SecondScreenonResetStack.json"
)
)
)
)
)
)
)
Screen(
child = Container(
children = listOf(
Text(
"Second Screen on Stack"
),
Button(
text = "Click me!",
onPress = listOf(
Navigate.PushView(
Route.Remote(
url = "resetStack.json"
)
)
)
)
)
)
)
Screen(
child = Container(
children = listOf(
Text(
"Third Screen on Stack"
),
Button(
text = "Click me to reset stack",
onPress = listOf(
Navigate.ResetStack(
route = Route.Remote("firstScreenonResetStack.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.