BaseLifecycleViewModel

Default LifecycleViewModel implementation respecting the Lifecycle of the presenting view.

Parameters

lifecycleSubscribables

The LifecycleSubscribable to be used by this viewModel.

Inheritors

Constructors

Link copied to clipboard
constructor(vararg lifecycleSubscribables: LifecycleSubscribable)

Properties

Link copied to clipboard

A StateFlow of the set of LifecycleSubscribable that are currently in use. Hook up your lifecycle to these LifecycleSubscribables where required.

Link copied to clipboard
expect val coroutineScope: CoroutineScope

CoroutineScope of the ViewModel. This scope is active until the ViewModel lifecycle is cleared.

Functions

Link copied to clipboard
fun didPause()

Function to be called when the presenting views lifecycle ends

Link copied to clipboard
fun didResume()

Function to be called when the presenting views lifecycle begins