onCancel method

  1. @mustCallSuper
void onCancel({
  1. bool dequeue = false,
})
inherited

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();
}