You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe. VectorStateFactory tries two approaches to create an initial state: Using the VectorViewModelFactory and using the constructor.
For applications using the SavedStateVectorViewModel, it becomes necessary to implement VectorViewModelFactory's initialState() method to restore this state from the SavedStateHandle, even though the most basic implementation here simply retrieves the state from the handle and returns it.
Describe the solution you'd like
An automated restoration of state from the SavedStateHandle in the case where the ViewModel does not implement the factory interface's initialState() method.
The text was updated successfully, but these errors were encountered:
This will work correctly only when the state has been saved using KEY_SAVED_STATE. If the user uses a different implementation of the persistState() method then the retrieved persisted state might be incomplete, or null.
Looks like this is infeasible using this solution.
Is your feature request related to a problem? Please describe.
VectorStateFactory
tries two approaches to create an initial state: Using theVectorViewModelFactory
and using the constructor.For applications using the
SavedStateVectorViewModel
, it becomes necessary to implementVectorViewModelFactory
'sinitialState()
method to restore this state from theSavedStateHandle
, even though the most basic implementation here simply retrieves the state from the handle and returns it.Describe the solution you'd like
An automated restoration of state from the
SavedStateHandle
in the case where the ViewModel does not implement the factory interface'sinitialState()
method.The text was updated successfully, but these errors were encountered: