onExpired method
Callback from the app if this task is expired.
If dequeue
is true
the task is removed from the queue.
Otherwise, it it kept on the queue for later.
Implementation
@mustCallSuper
void onExpired(BuildContext context) {
state = UserTaskState.expired;
AppTaskController().dequeue(id);
}