https://kotlinlang.org logo
Title
u

user

07/06/2022, 1:11 PM
How to make StateFlow<Model> polymorphic in Androd? I am at stage when I would like to expose my StateFlow() into the common BaseViewModel() class to implement common operations on it without repeating them in others implementations of ViewModels. I ended up with one idea, but faced with several limitations when has built PoC. My idea and its limitations are below, your solutions for origin question are welcomed. I split my model into interface and one concrete implementation. sealed interface Model { var isLoading: Boolean var errors:...