Impl base structure of bottom-navigation

This commit is contained in:
Shcherbatykh Oleg
2026-02-24 19:00:27 +03:00
parent 4794b0e185
commit 37c926ac77
19 changed files with 345 additions and 47 deletions

View File

@@ -39,6 +39,7 @@ dependencies {
// Compose
implementation(platform(libs.compose.bom))
implementation(libs.compose.runtime)
implementation("androidx.compose.material:material-icons-extended")
// Navigation Compose
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.navigation.common)

View File

@@ -25,6 +25,9 @@ sealed interface AppRoute {
@Serializable
data object Progress : AppRoute
@kotlinx.serialization.Serializable
data object Settings : AppRoute
@Serializable
data class ScheduleDetails(
val lessonId: Long

View File

@@ -4,19 +4,19 @@ import kotlinx.serialization.Serializable
@Serializable
enum class TopLevelDestination {
SCHEDULE,
NEWS,
PROGRESS
SCHEDULE, NEWS, PROGRESS, SETTINGS
}
fun TopLevelDestination.toRoute(): AppRoute = when (this) {
TopLevelDestination.SCHEDULE -> AppRoute.Schedule
TopLevelDestination.NEWS -> AppRoute.News
TopLevelDestination.PROGRESS -> AppRoute.Progress
TopLevelDestination.SETTINGS -> AppRoute.Settings
}
val TOP_LEVEL_DESTINATIONS: List<TopLevelDestination> = listOf(
TopLevelDestination.SCHEDULE,
TopLevelDestination.NEWS,
TopLevelDestination.PROGRESS
TopLevelDestination.PROGRESS,
TopLevelDestination.SETTINGS
)