onExpired method
Callback from the app if this task expires.
If dequeue is true (the default) the task is removed from the queue,
which also deletes it from persistent storage. Pass false to keep it on
the queue with state UserTaskState.expired, so it still counts in
AppTaskController.taskExpired.
Implementation
@mustCallSuper
void onExpired({bool dequeue = true}) {
AppTaskController().expire(id);
if (dequeue) AppTaskController().dequeue(id);
}