initFlow

fun SendbirdChat.initFlow(initParams: InitParams): Flow<InitResult>

Initializes SendbirdChat with given InitParams.

SendbirdChat.initFlow(params)
.onEach {
when (it) {
is InitResult.Migrating -> {
// migration started
}
is InitResult.Success -> {
// init success
}
}
}.catch {
// init failed
}.launchIn(MainScope())

Return

Flow of InitResult.

Since

4.17.0

Parameters

initParams

InitParams used for initialization.