KViewModel

constructor(initialState: State, application: Application)(source)

Parameters

initialState

The state emitted immediately to all collectors on subscription.

application

The Application instance, forwarded to AndroidViewModel.

Type Parameters

State

The UI state type. Prefer immutable data classes with default values.