public class HomeViewModel extends AndroidViewModel implements LifecycleObserver
Constructor and Description |
---|
HomeViewModel(Application application)
A constructor for this viewModel.
|
Modifier and Type | Method and Description |
---|---|
LiveData<Throwable> |
getThrowable() |
LiveData<User> |
getUser() |
LiveData<List<UserTypeWithAutoReply>> |
getUserTypes() |
void |
save(User user)
A method that saves the User or throws a throwable.
|
getApplication
public HomeViewModel(@NonNull Application application)
application
- , takes an Application object in as a parameterpublic LiveData<List<UserTypeWithAutoReply>> getUserTypes()
public LiveData<Throwable> getThrowable()
public void save(User user)
user
- , a User object.