Step 1: Add Dependency
id("com.google.dagger.hilt.android") version "2.49" apply false
kotlin("kapt")
id("com.google.dagger.hilt.android")implementation("com.google.dagger:hilt-android:2.49")
kapt("com.google.dagger:hilt-android-compiler:2.49")implementation ("androidx.hilt:hilt-navigation-compose:1.2.0")implementation("androidx.navigation:navigation-compose:2.7.7")
Good code.
ReplyDeleteI have changed onClick codes of Buttons as below:
SignupScreen:
errorE = email.isEmpty()
errorP = !errorE && password.isEmpty()
errorC = !errorE && !errorP && cPassword.isEmpty()
errorCP = !errorE && !errorP && !errorC && password != cPassword
if (!errorE && !errorP && !errorC && !errorCP && !pLength) {
vm.onSignup(email, password)
}
LoginScreen:
errorE = email.isEmpty()
errorP = !errorE && password.isEmpty()
if (!errorE && !errorP) vm.login(email, password)
Code is working fine without any bug.
Will watch all videos with my personal user id jamunaaprajapati at gmail dot com