Set the variable isPasswordCorrect to an observable data type that will cause a recomposition if its value changes, skipping any unnecessary recompositions. The value of isPasswordCorrect state must be true if the password contains digits, otherwise false.
Compose State
Password validation
Report a typo
Write a program in Kotlin
val userPassword = mutableStateOf(getPassword())
val isPasswordCorrect = // TODO
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.