AuthenticationChange

This sealed class describe the possible events that can be observed on the Flow created by calling App.authenticationChangeAsFlow.

The specific states are represented by these subclasses LoggedIn, LoggedOut and Removed.

Changes can thus be consumed this way:

app.authenticationChangeAsFlow().collect { change: AuthenticationChange ->
when(change) {
is LoggedIn -> handleLogin(change.user)
is LoggedOut -> handleLogOut(change.user)
is Removed -> handleRemove(change.user)
}
}

Inheritors

Properties

Link copied to clipboard
abstract val user: User

A reference to the User this event happened to.