onComplete

fun onComplete(completeCallback: (param: Task<T>) -> Unit): Task<T>
fun onComplete(taskCallback: TaskCallback<T>): Task<T>

Lambda is called once task has completed. You can then check .result for successful result or it will throw an error. Returns Task.

See also

for synchronous version of this