onBackPressed

fun Sequence<OnBackPressedConsumer>.onBackPressed(): Boolean

Propagates a back press event across a list of consumers. This starts by offering the event to the first consumer and passing it on to the next, until a consumer returns true.

Return

true to indicate that the back press has been consumed and should not be propagated to other consumers.