onCancel method
Callback from the app if this task is canceled.
If dequeue
is true
the task is removed from the queue.
Otherwise, it it kept on the queue with state UserTaskState.canceled
.
Implementation
@mustCallSuper
void onCancel({bool dequeue = false}) {
state = UserTaskState.canceled;
if (dequeue) AppTaskController().dequeue(id);
// _removeExecutor();
}