FirstViewModel
The MVVM androidx.lifecycle.ViewModel for the first screen in the MVVM demo. Delegates image loading to a com.grarcht.shuttle.demo.core.viewmodel.DefaultImageLoader and emits one-shot NavigationEvents when the user requests navigation.
Functions
Link copied to clipboard
Link copied to clipboard
Returns the ImageModel from the last successful load, or null if loading has not completed successfully.
Link copied to clipboard
Link copied to clipboard
Emits a NavigationEvent.Normally event for the view to execute, carrying the currently loaded image model. Does nothing if no image has been loaded yet.
Link copied to clipboard
Emits a NavigationEvent.WithShuttle event for the view to execute, carrying the currently loaded image model. Does nothing if no image has been loaded yet.