Skip to content

//workflow/com.squareup.workflow1.ui.container/BackButtonScreen/BackButtonScreen

BackButtonScreen

[androidJvm]
Content
fun <W : Screen> BackButtonScreen(wrapped: W, shadow: Boolean = false, onBackPressed: () -> Unit? = null)
More info

Parameters

androidJvm

shadow

If true, onBackPressed is set as the backPressedHandler after the wrapped rendering’s view is built / updated, effectively overriding it. If false (the default), onBackPressed is set afterward, to allow the wrapped rendering to take precedence if it sets a backPressedHandler of its own – the handler provided here serves as a default.

onBackPressed

The function to fire when the device back button is pressed, or null to set no handler – or clear a handler that was set previously. Defaults to null.