Created
December 3, 2023 02:47
-
-
Save 0xZhangKe/a4dbd79dbcccce3e21ffb07240ed3a10 to your computer and use it in GitHub Desktop.
UiState copy usage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class LoginUiState( | |
val name:String, | |
val avatar: String, | |
val consentAgreed: Boolean | |
) | |
fun onAgreeChecked(){ | |
uistate = uiState.copy( | |
consentAgreed = true, | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment