Daniel
06/13/2021, 9:58 PMval trackSettingsState = repo.trackSettings().collectAsState(initialValue = null)
val trackSettings = trackSettingsState.value
if (trackSettings == null) {
Spinner()
}
TextField(trackSettings.frequency, /* ... */)
Text(trackSettings.name)
I could also use a with statement or an else branch, but I prefer handling the null-case up front and then being able to assume it isn't null laterZach Klippenstein (he/him) [MOD]
06/14/2021, 3:17 AMlet