I have a sealed interface for loading states (Load...
# getting-started
s
I have a sealed interface for loading states (Loading, Error, data class Success(stuff)). Success is the only data class. In one place, I just want to check if the state is Success and do something. how can I check that?
Nevermind, I was doing a live data, and wasn't comparing to the value of the live data
j
For the general question for posterity, you can do
if (state is Success) { ... }
(https://pl.kotl.in/wI6wbgLFr)