onCancel method

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

Called by the app when the user cancels this task.

If dequeue is true the task is removed from the queue. Otherwise, it is kept on the queue with state UserTaskState.canceled.

Implementation

@mustCallSuper
void onCancel({bool dequeue = false}) {
  state = UserTaskState.canceled;
  if (dequeue) AppTaskController().dequeue(id);
}