Skip to content

Commit

Permalink
Add BackHandler to navigator snippet part (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvanyo authored Feb 15, 2024
1 parent 1b8b1fa commit 806cb44
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ import androidx.compose.ui.unit.sp
fun SampleListDetailPaneScaffoldParts() {
// [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02]
val navigator = rememberListDetailPaneScaffoldNavigator<Nothing>()

BackHandler(navigator.canNavigateBack()) {
navigator.navigateBack()
}
// [END android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part02]

// [START android_compose_adaptivelayouts_sample_list_detail_pane_scaffold_part01]
Expand Down

0 comments on commit 806cb44

Please sign in to comment.