Skip to content

Commit a1e7ee7

Browse files
committed
Add comment to explain what LocalBackButtonVisibility is intended for.
1 parent 9d9aa7f commit a1e7ee7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/com/example/nav3recipes/scenes/listdetail/ListDetailScene.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo
2727
import androidx.compose.runtime.Composable
2828
import androidx.compose.runtime.CompositionLocalProvider
2929
import androidx.compose.runtime.compositionLocalOf
30-
import androidx.compose.runtime.mutableStateOf
3130
import androidx.compose.runtime.remember
3231
import androidx.compose.ui.Modifier
3332
import androidx.navigation3.runtime.NavEntry
@@ -94,6 +93,11 @@ class ListDetailScene<T : Any>(
9493
}
9594
}
9695

96+
/**
97+
* This `CompositionLocal` can be used by a detail `NavEntry` to decide whether to display
98+
* a back button. Default is `true`. It is set to `false` for a detail `NavEntry` when being
99+
* displayed in a `ListDetailScene`.
100+
*/
97101
val LocalBackButtonVisibility = compositionLocalOf{ true }
98102

99103
@Composable

0 commit comments

Comments
 (0)