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 for later.
Implementation
@mustCallSuper
void onCancel(BuildContext context, {bool dequeue = false}) {
state = UserTaskState.canceled;
(dequeue)
? AppTaskController().dequeue(id)
: state = UserTaskState.enqueued;
}