onStateChange

fun onStateChange(callback: (TaskState) -> Unit)

Observes state changes.