-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Expand file tree
/
Copy pathMainNavDisplay.kt
More file actions
28 lines (23 loc) · 753 Bytes
/
MainNavDisplay.kt
File metadata and controls
28 lines (23 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
* SPDX-FileCopyrightText: 2026 NewPipe e.V. <https://newpipe-ev.de>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package net.newpipe.app.navigation
import androidx.compose.runtime.Composable
import androidx.navigation3.runtime.NavKey
import androidx.navigation3.runtime.entryProvider
import androidx.navigation3.runtime.rememberNavBackStack
import androidx.navigation3.ui.NavDisplay
/**
* Navigation display for compose screens
* @param startDestination Starting destination for the activity/app
*/
@Composable
fun MainNavDisplay(startDestination: NavKey) {
val backstack = rememberNavBackStack(Screen.config, startDestination)
NavDisplay(
backStack = backstack,
entryProvider = entryProvider {
}
)
}