Closed Bugzer0 closed 1 year ago
In fact, AppViewModel is equivalent to a global singleton object, in MvvmHelper, you can write it in the singleton class For example:
object GlobalObject{
var userInfo = UnPeekLiveData.Builder<UserInfo>().setAllowNullValue(true).create()
}
I want to use global variable, for example i use AppViewModel in JetpackMvvm project
class AppViewModel : BaseViewModel() { var userInfo = UnPeekLiveData.Builder<UserInfo>().setAllowNullValue(true).create() }
in MvvmHelper, is there any substitute? thanks for awesome lib