Browse Source

app: creating a page for choosing the date of birth, creating navigation

Bobarik41p 3 weeks ago
parent
commit
023aa82e6f

+ 5 - 0
App/app/build.gradle.kts

@@ -66,4 +66,9 @@ dependencies {
     androidTestImplementation(libs.androidx.ui.test.junit4)
     debugImplementation(libs.androidx.ui.tooling)
     debugImplementation(libs.androidx.ui.test.manifest)
+    implementation (libs.datetime)
+    implementation(libs.androidx.navigation.compose)
+    implementation(libs.androidx.navigation.fragment)
+    implementation(libs.androidx.navigation.ui)
+    implementation(libs.androidx.navigation.dynamic.features.fragment)
 }

+ 6 - 1
App/app/src/main/java/com/example/mystictale/MainActivity.kt

@@ -1,9 +1,11 @@
 package com.example.mystictale
 
+import android.os.Build
 import android.os.Bundle
 import androidx.activity.ComponentActivity
 import androidx.activity.compose.setContent
 import androidx.activity.enableEdgeToEdge
+import androidx.annotation.RequiresApi
 import androidx.compose.foundation.layout.fillMaxSize
 import androidx.compose.foundation.layout.padding
 import androidx.compose.material3.Scaffold
@@ -11,19 +13,22 @@ import androidx.compose.material3.Text
 import androidx.compose.runtime.Composable
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.tooling.preview.Preview
+import com.example.mystictale.Screen.RegistrationDateOfBirth
 import com.example.mystictale.Screen.RegistrationEmail
+import com.example.mystictale.Screen.RegistrationName
 import com.example.mystictale.Screen.RegistrationPassword
 import com.example.mystictale.Screen.Start
 import com.example.mystictale.ui.theme.MysticTaleTheme
 import drawable.Screen.LoadingScreen
 
 class MainActivity : ComponentActivity() {
+    @RequiresApi(Build.VERSION_CODES.O)
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         enableEdgeToEdge()
         setContent {
             MysticTaleTheme {
-                RegistrationPassword()
+                RegistrationDateOfBirth()
             }
         }
     }

+ 193 - 0
App/app/src/main/java/com/example/mystictale/Screen/RegistrationDateOfBirth.kt

@@ -0,0 +1,193 @@
+package com.example.mystictale.Screen
+
+import android.os.Build
+import androidx.annotation.RequiresApi
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.gestures.detectTapGestures
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonColors
+import androidx.compose.material3.LinearProgressIndicator
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.derivedStateOf
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.paint
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.StrokeCap
+import androidx.compose.ui.input.pointer.pointerInput
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.LocalFocusManager
+import androidx.compose.ui.platform.LocalSoftwareKeyboardController
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import com.example.mystictale.R
+import com.example.mystictale.resources.DateOfBirthTextField
+import com.example.mystictale.ui.theme.DarkPurple
+import com.example.mystictale.ui.theme.OpenSans
+import com.vanpra.composematerialdialogs.MaterialDialog
+import com.vanpra.composematerialdialogs.datetime.date.datepicker
+import com.vanpra.composematerialdialogs.rememberMaterialDialogState
+import java.time.LocalDate
+import java.time.format.DateTimeFormatter
+
+@RequiresApi(Build.VERSION_CODES.O)
+@Composable
+fun RegistrationDateOfBirth() {
+    val focusManager = LocalFocusManager.current
+    val keyboardController = LocalSoftwareKeyboardController.current
+    var pickedDate by remember { mutableStateOf(LocalDate.now()) }
+    val formattedDate by remember {
+        derivedStateOf { DateTimeFormatter.ofPattern("ddMMyyyy").format(pickedDate) }
+    }
+    val formattedDateFromBase by remember {
+        derivedStateOf { DateTimeFormatter.ofPattern("yyyy-MM-dd").format(pickedDate) }
+    }
+    val dateDialogState = rememberMaterialDialogState()
+    val dateOfBirth = remember {
+        mutableStateOf("")
+    }
+    Column(
+        Modifier
+            .fillMaxSize()
+            .paint(
+                painterResource(id = R.drawable.background),
+                contentScale = ContentScale.FillBounds
+            )
+            .padding(10.dp)
+            .pointerInput(Unit) {
+                detectTapGestures(onTap = {
+                    keyboardController?.hide()
+                    focusManager.clearFocus()
+                })
+            },
+        verticalArrangement = Arrangement.SpaceBetween,
+        horizontalAlignment = Alignment.CenterHorizontally
+    ) {
+
+        Column {
+            Box(
+                modifier = Modifier
+                    .padding(top = 30.dp),
+                contentAlignment = Alignment.TopStart
+            ) {
+                Button(
+                    onClick = { /*TODO*/ }, colors = ButtonColors(
+                        disabledContentColor = Color.White,
+                        disabledContainerColor = Color.Transparent,
+                        contentColor = Color.White,
+                        containerColor = Color.Transparent
+                    )
+                ) {
+                    Image(
+                        painter = painterResource(id = R.drawable.back),
+                        contentDescription = "back",
+                        modifier = Modifier
+                            .width(11.dp)
+                            .height(14.dp)
+                    )
+                }
+                Row(
+                    modifier = Modifier
+                        .fillMaxWidth()
+                        .padding(top = 22.dp),
+                    horizontalArrangement = Arrangement.Center,
+                    verticalAlignment = Alignment.CenterVertically
+                ) {
+
+
+                    LinearProgressIndicator(
+                        progress = 0.8f,
+                        modifier = Modifier.width(157.dp),
+                        strokeCap = StrokeCap.Round,
+                        trackColor = Color(0xFFA1A0A3),
+                        color = Color(0xFF28176B)
+                    )
+                }
+            }
+            Spacer(modifier = Modifier.height(30.dp))
+            Text(
+                text = "Ваша дата рождения",
+                fontWeight = FontWeight.Bold,
+                fontFamily = OpenSans,
+                fontSize = 24.sp,
+                color = Color.White,
+                modifier = Modifier
+                    .fillMaxWidth(0.9f)
+                    .padding(start = 40.dp),
+                style = MaterialTheme.typography.headlineMedium
+            )
+            Spacer(modifier = Modifier.height(30.dp))
+
+            DateOfBirthTextField(
+                dateOfBirth = dateOfBirth.value,
+                onValue = { dob -> dateOfBirth.value = dob.filter { it.isDigit() } },
+                dateDialogState = dateDialogState
+            )
+        }
+
+        Box(Modifier.padding(bottom = 40.dp)) {
+            Button(
+                onClick = { /*TODO*/ },
+                modifier = Modifier
+                    .width(290.dp)
+                    .height(48.dp),
+                shape = RoundedCornerShape(12.dp),
+                colors = ButtonColors(
+                    containerColor = DarkPurple,
+                    contentColor = Color.White,
+                    disabledContentColor = Color.White,
+                    disabledContainerColor = DarkPurple
+                )
+            ) {
+                Text("Далее", fontSize = 20.sp, fontWeight = FontWeight.Bold)
+
+            }
+
+        }
+
+
+    }
+
+    MaterialDialog(
+        dialogState = dateDialogState,
+        buttons = {
+            positiveButton(text = "Ok")
+            negativeButton("cancel")
+        })
+    {
+        datepicker(
+            initialDate = LocalDate.now(),
+            allowedDateValidator = {
+                it <= LocalDate.now()
+            }
+
+
+        ) {
+            pickedDate = it
+            dateOfBirth.value = formattedDate.toString()
+
+        }
+    }
+}
+
+

+ 2 - 1
App/app/src/main/java/com/example/mystictale/Screen/RegistrationEmail.kt

@@ -31,6 +31,7 @@ import androidx.compose.ui.layout.ContentScale
 import androidx.compose.ui.res.painterResource
 import androidx.compose.ui.text.TextStyle
 import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.input.KeyboardType
 import androidx.compose.ui.tooling.preview.Preview
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.sp
@@ -111,7 +112,7 @@ fun RegistrationEmail() {
             )
             Spacer(modifier = Modifier.height(30.dp))
 
-            GenericTextField(email.value,{email.value = it},"E-mail" )
+            GenericTextField(email.value,{email.value = it},"E-mail",KeyboardType.Email)
         }
 
         Box(Modifier.padding(bottom = 40.dp)){

+ 133 - 1
App/app/src/main/java/com/example/mystictale/Screen/RegistrationName.kt

@@ -1,4 +1,136 @@
 package com.example.mystictale.Screen
 
-class RegistrationName {
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonColors
+import androidx.compose.material3.LinearProgressIndicator
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.paint
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.StrokeCap
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.input.KeyboardType
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import com.example.mystictale.R
+import com.example.mystictale.resources.GenericTextField
+import com.example.mystictale.ui.theme.DarkPurple
+import com.example.mystictale.ui.theme.OpenSans
+
+@Composable
+fun RegistrationName() {
+    val name = remember {
+        mutableStateOf("")
+    }
+    Column(
+        Modifier
+            .fillMaxSize()
+            .paint(
+                painterResource(id = R.drawable.background),
+                contentScale = ContentScale.FillBounds
+            )
+            .padding(10.dp),
+        verticalArrangement = Arrangement.SpaceBetween,
+        horizontalAlignment = Alignment.CenterHorizontally
+    ) {
+
+        Column {
+            Box(
+                modifier = Modifier
+                    .padding(top = 30.dp),
+                contentAlignment = Alignment.TopStart
+            ) {
+                Button(
+                    onClick = { /*TODO*/ }, colors = ButtonColors(
+                        disabledContentColor = Color.White,
+                        disabledContainerColor = Color.Transparent,
+                        contentColor = Color.White,
+                        containerColor = Color.Transparent
+                    )
+                ) {
+                    Image(
+                        painter = painterResource(id = R.drawable.back),
+                        contentDescription = "back",
+                        modifier = Modifier
+                            .width(11.dp)
+                            .height(14.dp)
+                    )
+                }
+                Row(
+                    modifier = Modifier
+                        .fillMaxWidth()
+                        .padding(top = 22.dp),
+                    horizontalArrangement = Arrangement.Center,
+                    verticalAlignment = Alignment.CenterVertically
+                ) {
+
+
+                    LinearProgressIndicator(
+                        progress = 0.6f,
+                        modifier = Modifier.width(157.dp),
+                        strokeCap = StrokeCap.Round,
+                        trackColor = Color(0xFFA1A0A3),
+                        color = Color(0xFF28176B)
+                    )
+                }
+            }
+            Spacer(modifier = Modifier.height(30.dp))
+            Text(
+                text = "Как Вас зовут?",
+                fontWeight = FontWeight.Bold,
+                fontFamily = OpenSans,
+                fontSize = 30.sp,
+                color = Color.White,
+                modifier = Modifier
+                    .fillMaxWidth(0.9f)
+                    .padding(start = 40.dp),
+                style = MaterialTheme.typography.headlineMedium
+            )
+            Spacer(modifier = Modifier.height(30.dp))
+
+            GenericTextField(name.value, { name.value = it }, "Имя", KeyboardType.Text)
+        }
+
+
+        Box(Modifier.padding(bottom = 40.dp)) {
+            Button(
+                onClick = { /*TODO*/ },
+                modifier = Modifier
+                    .width(290.dp)
+                    .height(48.dp),
+                shape = RoundedCornerShape(12.dp),
+                colors = ButtonColors(
+                    containerColor = DarkPurple,
+                    contentColor = Color.White,
+                    disabledContentColor = Color.White,
+                    disabledContainerColor = DarkPurple
+                )
+            ) {
+                Text("Далее", fontSize = 20.sp, fontWeight = FontWeight.Bold)
+
+            }
+
+        }
+
+
+    }
 }

+ 1 - 1
App/app/src/main/java/com/example/mystictale/Screen/RegistrationPassword.kt

@@ -88,7 +88,7 @@ fun RegistrationPassword() {
 
 
                     LinearProgressIndicator(
-                        progress = 0.2f,
+                        progress = 0.4f,
                         modifier = Modifier.width(157.dp),
                         strokeCap = StrokeCap.Round,
                         trackColor = Color(0xFFA1A0A3),

+ 43 - 0
App/app/src/main/java/com/example/mystictale/navigation/Navigation.kt

@@ -0,0 +1,43 @@
+package com.example.mystictale.navigation
+
+import android.os.Build
+import androidx.annotation.RequiresApi
+import androidx.compose.runtime.Composable
+import androidx.navigation.compose.NavHost
+import androidx.navigation.compose.composable
+import androidx.navigation.compose.rememberNavController
+import com.example.mystictale.Screen.RegistrationDateOfBirth
+import com.example.mystictale.Screen.RegistrationEmail
+import com.example.mystictale.Screen.RegistrationName
+import com.example.mystictale.Screen.RegistrationPassword
+import com.example.mystictale.Screen.Start
+
+@RequiresApi(Build.VERSION_CODES.O)
+@Composable
+fun Navigation() {
+    val navController = rememberNavController()
+    NavHost(navController = navController, startDestination = Screens.Start.route)
+    {
+        composable(Screens.Start.route)
+        {
+            Start()
+        }
+        composable(Screens.RegistrationEmail.route)
+        {
+            RegistrationEmail()
+        }
+        composable(Screens.RegistrationName.route)
+        {
+            RegistrationName()
+        }
+        composable(Screens.RegistrationPassword.route)
+        {
+            RegistrationPassword()
+        }
+        composable(Screens.RegistrationDateOfBirth.route)
+        {
+            RegistrationDateOfBirth()
+        }
+
+    }
+}

+ 9 - 0
App/app/src/main/java/com/example/mystictale/navigation/Screens.kt

@@ -0,0 +1,9 @@
+package com.example.mystictale.navigation
+
+sealed class Screens (val route:String){
+    object Start:Screens("start")
+    object RegistrationEmail:Screens("email")
+    object RegistrationPassword:Screens("password")
+    object RegistrationDateOfBirth: Screens("dateOfBirth")
+    object RegistrationName: Screens("name")
+}

+ 66 - 0
App/app/src/main/java/com/example/mystictale/resources/DateOfBirthTextField.kt

@@ -0,0 +1,66 @@
+package com.example.mystictale.resources
+
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.offset
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.text.KeyboardOptions
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.DateRange
+import androidx.compose.material3.Icon
+import androidx.compose.material3.Text
+import androidx.compose.material3.TextField
+import androidx.compose.material3.TextFieldDefaults
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.input.KeyboardType
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import com.example.mystictale.ui.theme.OpenSans
+import com.vanpra.composematerialdialogs.MaterialDialogState
+
+@Composable
+fun DateOfBirthTextField(dateOfBirth:String,onValue:(String) -> Unit,dateDialogState: MaterialDialogState) {
+    val padding = 10.dp;
+    TextField(
+        value = dateOfBirth,
+        onValueChange = onValue,
+        Modifier
+            .fillMaxWidth(0.95f)
+            .padding(start = 35.dp),
+        keyboardOptions = KeyboardOptions(
+            keyboardType = KeyboardType.Number
+        ),
+        colors = TextFieldDefaults.colors(
+            unfocusedTextColor = Color.White,
+            unfocusedPlaceholderColor = Color(0xffA1A0A3),
+            unfocusedContainerColor = Color.Transparent,
+            focusedTextColor = Color.White,
+            focusedContainerColor = Color.Transparent,
+            focusedPlaceholderColor = Color(0xffA1A0A3),
+            focusedIndicatorColor = Color(0xff28176B),
+            unfocusedIndicatorColor = Color(0xff28176B)
+        ),
+        trailingIcon = {
+            Icon(
+                Icons.Filled.DateRange,
+                contentDescription = "Дата рождения",
+                modifier = Modifier
+                    .offset(x = -padding)
+                    .padding(end = 2.dp)
+                    .clickable { dateDialogState.show() }
+            )
+        },
+        visualTransformation = dateOfBirthVisualTransformation(),
+        placeholder = { Text("Дата рождения") },
+        maxLines = 1,
+        textStyle = TextStyle(
+            fontFamily = OpenSans,
+            fontWeight = FontWeight.Light,
+            fontSize = 15.sp
+        )
+    )
+}

+ 6 - 1
App/app/src/main/java/com/example/mystictale/resources/GenericTextField.kt

@@ -2,6 +2,7 @@ package com.example.mystictale.resources
 
 import androidx.compose.foundation.layout.fillMaxWidth
 import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.text.KeyboardOptions
 import androidx.compose.material3.Text
 import androidx.compose.material3.TextField
 import androidx.compose.material3.TextFieldDefaults
@@ -10,18 +11,22 @@ import androidx.compose.ui.Modifier
 import androidx.compose.ui.graphics.Color
 import androidx.compose.ui.text.TextStyle
 import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.input.KeyboardType
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.sp
 import com.example.mystictale.ui.theme.OpenSans
 
 @Composable
-fun GenericTextField(value:String, onValue:(String) -> Unit,placeholder:String) {
+fun GenericTextField(value:String, onValue:(String) -> Unit,placeholder:String, keyboardType:KeyboardType) {
     TextField(
         value = value,
         onValueChange = onValue,
         Modifier
             .fillMaxWidth(0.95f)
             .padding(start = 35.dp),
+        keyboardOptions = KeyboardOptions(
+            keyboardType = keyboardType
+        ),
         colors = TextFieldDefaults.colors(
             unfocusedTextColor = Color.White,
             unfocusedPlaceholderColor = Color(0xffA1A0A3),

+ 5 - 0
App/app/src/main/java/com/example/mystictale/resources/PasswordTextField.kt

@@ -3,6 +3,7 @@ package com.example.mystictale.resources
 import androidx.compose.foundation.layout.fillMaxWidth
 import androidx.compose.foundation.layout.padding
 import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.text.KeyboardOptions
 import androidx.compose.material3.Icon
 import androidx.compose.material3.IconToggleButton
 import androidx.compose.material3.Text
@@ -17,6 +18,7 @@ import androidx.compose.ui.res.painterResource
 import androidx.compose.ui.text.Placeholder
 import androidx.compose.ui.text.TextStyle
 import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.input.KeyboardType
 import androidx.compose.ui.text.input.PasswordVisualTransformation
 import androidx.compose.ui.text.input.VisualTransformation
 import androidx.compose.ui.unit.dp
@@ -49,6 +51,9 @@ fun PasswordTextField(value:String, onValueChange:(String)->Unit,placeholder: St
                 )
             }
         },
+        keyboardOptions = KeyboardOptions(
+            keyboardType = KeyboardType.NumberPassword
+        ),
         visualTransformation = if (checked.value) VisualTransformation.None else PasswordVisualTransformation(),
         colors = TextFieldDefaults.colors(
             unfocusedTextColor = Color.White,

+ 38 - 0
App/app/src/main/java/com/example/mystictale/resources/dateOfBirthVisualTransformation.kt

@@ -0,0 +1,38 @@
+package com.example.mystictale.resources
+
+import androidx.compose.ui.text.AnnotatedString
+import androidx.compose.ui.text.input.OffsetMapping
+import androidx.compose.ui.text.input.TransformedText
+import androidx.compose.ui.text.input.VisualTransformation
+
+fun dateOfBirthVisualTransformation() = VisualTransformation { text ->
+    val trimmed = if (text.text.length >= 8) text.text.substring(0..7) else text.text
+    val formatted = buildString {
+        for (i in trimmed.indices) {
+            if (i == 2 || i == 4) append('/')
+            append(trimmed[i])
+        }
+    }
+    TransformedText(
+        text = AnnotatedString(formatted),
+        offsetMapping = object : OffsetMapping {
+            override fun originalToTransformed(offset: Int): Int {
+                return when {
+                    offset <= 2 -> offset
+                    offset <= 4 -> offset + 1
+                    offset <= 8 -> offset + 2
+                    else -> 10
+                }
+            }
+
+            override fun transformedToOriginal(offset: Int): Int {
+                return when {
+                    offset <= 2 -> offset
+                    offset <= 5 -> offset - 1
+                    offset <= 10 -> offset - 2
+                    else -> 8
+                }
+            }
+        }
+    )
+}

+ 10 - 0
App/gradle/libs.versions.toml

@@ -1,6 +1,7 @@
 [versions]
 agp = "8.5.1"
 kotlin = "1.9.0"
+datetime = "0.8.1-rc"
 coreKtx = "1.13.1"
 junit = "4.13.2"
 junitVersion = "1.2.1"
@@ -8,10 +9,13 @@ espressoCore = "3.6.1"
 lifecycleRuntimeKtx = "2.8.5"
 activityCompose = "1.9.2"
 composeBom = "2024.04.01"
+material3 = "1.4.0-alpha03"
+navigationCompose = "2.8.0"
 
 [libraries]
 androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
 junit = { group = "junit", name = "junit", version.ref = "junit" }
+datetime = { module = "io.github.vanpra.compose-material-dialogs:datetime", version.ref = "datetime" }
 androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
 androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
 androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
@@ -24,6 +28,12 @@ androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-toolin
 androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
 androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
 androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
+material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }
+
+androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
+androidx-navigation-dynamic-features-fragment = { module = "androidx.navigation:navigation-dynamic-features-fragment", version.ref = "navigationCompose" }
+androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment", version.ref = "navigationCompose" }
+androidx-navigation-ui = { module = "androidx.navigation:navigation-ui", version.ref = "navigationCompose" }
 
 [plugins]
 android-application = { id = "com.android.application", version.ref = "agp" }