// Define two datas in viewmodel
class LoginViewModel @Inject constructor() : BaseViewModel<LoginIntent>() {
val height = MutableStateFlow(-1f)
val weight = MutableStateFlow(-1f)
}
// The data is used in the UI to make the determination.
BaseLoginScreen(
canNextClick = vm.weight.collectAsState().value!=-1f && vm.weight.collectAsState().value!=-1f,
) { 。。。 }
// it will report error: Backend Internal error: Exception during IR lowering, and Runtime JAR files in the classpath should have the same version.
// Solution:
val height = vm.weight.collectAsState().value
val weight = vm.weight.collectAsState().value
BaseLoginScreen(
canNextClick = height!=-1f && weight!=-1f,
) { ... }
Similar Posts:
- [Solved] Runtime JAR file has version 1.4 which is older than required for API version 1.5
- JAVA Command Error: A JNI error has occurred, please check your installation and try again [Solved]
- Ffmpeg scaling — the solution of “width / height not divisible by 2”
- ScrollView has ambiguous scrollable content height
- [Solved] oracle Execute netca Error: UnsatisfiedLinkError exception loading native library: njni11
- [Solved] echart Error: Can’t get dom width or height
- ModuleNotFoundError: No module named ‘_pywrap_tensorflow_internal’ [How to Solve]
- Error UIViewAlertForUnsatisfiableConstraints when using tableview in Xib
- Python pandas.read_ Oserror: initializing from file failed
- Execution failed for task ‘:app:checkDebugDuplicateClasses‘.