Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Scrollable List codelab: Android Compose Generics Objects and Extensions #168

Open
Tushar-Coder opened this issue Jan 25, 2025 · 0 comments

Comments

@Tushar-Coder
Copy link

Tushar-Coder commented Jan 25, 2025

Name of the Codelab or Codelab URL

Describe the problem
Wrong use of 'let' scope function is given in the lesson. Instead of 'let' scope function there should be a 'with' scope function.
fun printQuiz() { question1.let { println(it.questionText) println(it.answer) println(it.difficulty) } println() question2.let { println(it.questionText) println(it.answer) println(it.difficulty) } println() question3.let { println(it.questionText) println(it.answer) println(it.difficulty) } println() }

It should be :
fun printQuiz() { with(question1) { println(questionText) println(answer) println(difficulty) } println() with(question2) { println(questionText) println(answer) println(difficulty) } println() with(question3) { println(questionText) println(answer) println(difficulty) } println() }

In which lesson and step of the codelab can this issue be found?
Generics, objects, and extensions + 8. Use scope functions to access class properties and methods

How to reproduce?
N/A - this is a content error

Versions
N/A - this is a content error

Additional information
N/A

codelab: basic-android-compose-training-add-scrollable-list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant