onSuccess

fun Flow<TaskState>.onSuccess(action: suspend () -> Unit): Flow<TaskState>

Invokes action when the task reaches TaskState.Success.