on

open fun on(state: T, @NonNull task: Task): SelectTask<T>

Add a task to run when the state is equal to the given state.

Return

this task

Parameters

state

the state to run the task on

task

the task to run