-
-
Save skydoves/5a346eb0083becc9ced98b6d222cff96 to your computer and use it in GitHub Desktop.
local_inspection_mode
This file contains hidden or 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
@Composable | |
fun UserProfiles(viewModel: UserViewModel) { | |
val users by if (LocalInspectionMode.current) { | |
remember { mutableStateOf(MockUtils.mockUsers) } | |
} else { | |
viewModel.users.collectAsStateWithLifecycle() | |
} | |
LazyColumn { | |
items(users) { user -> | |
.. | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment