onComplete

fun onComplete(@MainThread callback: (MoEResult<T>) -> Unit): MoETask<T>

Attaches a callback invoked on the main thread when the operation completes, whether successful or not. Use a when expression on the sealed MoEResult to distinguish.

Return

This instance for chaining.

Parameters

callback

Receives the sealed MoEResult.