Closed mathemandy closed 3 years ago
hi @mathemandy !
MutableLiveData
is open class, so you can extend from it. what restrictions limit you?
also we use EventsDispatcher
as replace for SingleLiveEvent
- are you sure that you need SingleLiveEvent
? maybe version with interface will be good?
https://github.com/icerockdev/moko-mvvm/blob/master/sample/mpp-library/src/commonMain/kotlin/com/icerockdev/library/sample2/EventsViewModel.kt#L15
I am trying to extend MutableLivedata to support SingleLiveEvent for a feature I need. but the api is restricting how I can conveniently use the class