Created
December 27, 2022 08:44
-
-
Save victory316/c8fd4b4261d89dba2189e00a40498c9a to your computer and use it in GitHub Desktop.
When statement parsing sealed class
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
when (val result = queryList) { | |
is Result.Error -> {} | |
is Result.Loading -> {} | |
is Result.Success -> { | |
val mydata = result.data | |
// .. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment