PopStack

Describes the PopStack action and its atributes

What is it?

The PopStack is a navigation action that removes the stack of screens where the current screen is displayed on.

The PopStack structure is:

AttributeTypeRequiredDefinition
navigationContextNavigationContextNavigation Context sent from the previous screen.

How to use it?

In this example, there is a screen with a button that, when clicked, “kills” the stack of screens where the current screen is on.

To test it you need to navigate to this screen example, in a stack already built, and click on the button. This will destroy the entire stack

Screen(
    child = Button(
        text = "Click me!",
        onPress = listOf(
            Navigate.PopStack()
        )
    )
)