Код: Выделить всё
package com.example.recipesavercompose.navigation
import androidx.compose.runtime.Composable
import androidx.navigation.NavDestination
import androidx.navigation.NavHost
import androidx.navigation.NavHostController
import androidx.navigation.compose.composable
import com.example.recipesavercompose.compose.Culinary_Terms
import com.example.recipesavercompose.compose.Drafts
import com.example.recipesavercompose.compose.Ingredient_Substitutions
import com.example.recipesavercompose.compose.Recipes
import com.example.recipesavercompose.compose.Settings
import com.example.recipesavercompose.compose.View_Recipe
@Composable
fun NavGraph (navController: NavHostController){
val initialDestination = NavDestination.createRoute(Screens.Recipes.route)
NavHost(navController = navController, startDestination = initialDestination)
{
composable(route = Screens.Recipes.route){
Recipes()
}
composable(route = Screens.CulinaryTerms.route){
Culinary_Terms()
}
composable(route = Screens.Drafts.route){
Drafts()
}
composable(route = Screens.IngredientSubstitutions.route){
Ingredient_Substitutions()
}
composable(route = Screens.Settings.route){
Settings()
}
composable(route = Screens.ViewRecipe.route){
View_Recipe()
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/761 ... t-does-not