Package-level declarations
Contains view models of frontends.
Types
Composes multiple ViewModelProvider.Factorys. When create is called to create a view model it will try each factory in factories until it finds a factory which can create the requested view model.
Factory used to create view models upon re-creation of the fragment. The parameters should reflect the primary constructor of the ViewModel being recreated.
A combination of FrontendViewModel and AndroidViewModel. Should only be used when the Application instance is really required. This should be rare however, as ViewModels should not normally rely on a context. Instead, the layout should resolve raw information from the ViewModel using its own context.
Thrown when an application tries to create an instance of ViewModel class, but the specified class does not have the required constructor.
Class to be used as a delegate to a ViewModel which can be stored and retrieved in a ViewModelStore.
Thrown when an application tries to create an instance of ViewModel class, but the specified class object cannot be instantiated. The instantiation can fail for a variety of reasons including but not limited to:
This can be used to store a property of a fragment in a ViewModelStore. The property will be encapsulated in a ViewModel and stored, so that it can be retrieved upon re-creation of a fragment.
This object contains functions that assist in the creation of a ViewModelProvider and retrieving view models from it. This is the preferred method of interacting with ViewModelProvider as it facilitates the mocking of view model creation during view comparison tests.