In which task and step of the codelab can this issue be found?
11.2.1 "In TipTimeScreen() composable function, call the toDoubleOrNull function on the amountInput variable, to convert the String to a Double:"
Describe the problem
it says in the TipTimeScreen() function but it is in the EditNumberField() function.
Steps to reproduce?
Go to the TipTimeScreen() function
Enter the code: "val amount = amountInput.toDoubleOrNull()"
See error "Unresolved reference: amountInput"
VersionsAndroid Studio version: flamingo
API version of the emulator: 21 (5.0)
Additional informationInclude screenshots if they would be useful in clarifying the problem.
@tibolanneau
Thank you for reaching out to us. I think you missed a step.
You need to Hoist the state; move the remembered state from the EditNumberField() function to the TipTimeLayout()function:
URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-compose-using-state?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-2-pathway-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-using-state#10
In which task and step of the codelab can this issue be found? 11.2.1 "In TipTimeScreen() composable function, call the toDoubleOrNull function on the amountInput variable, to convert the String to a Double:"
Describe the problem it says in the TipTimeScreen() function but it is in the EditNumberField() function.
Steps to reproduce?
Versions Android Studio version: flamingo API version of the emulator: 21 (5.0)
Additional information Include screenshots if they would be useful in clarifying the problem.![image](https://user-images.githubusercontent.com/122890033/235441797-9a026341-2eaa-460e-8bd6-b2446123f0e9.png)