Skip to content

Tutorial: Poor language | Android Basics: Viewmodel and State in Compose #276

@purezen

Description

@purezen

On the url: https://developer.android.com/codelabs/basic-android-kotlin-compose-viewmodel-and-state, there is a line:

In the GameViewModel.kt file, add a backing property to uiState named _uiState. Name the property uiState and is of the type StateFlow.

  • Firstly, it should be add a backing property to GameViewModel ?
  • The name should be uiState.
  • There is repetition in second line about naming the property.

It can be instead:

In the GameViewModel.kt file, add a backing property to GameViewModel class named uiState of the type StateFlow<GameUiState>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions