onDone method

  1. @mustCallSuper
void onDone({
  1. bool dequeue = false,
  2. Data? result,
})

Callback from the app when this task is done.

If dequeue is true the task is removed from the queue. result can specify the result obtained from this task, if available.

Implementation

@mustCallSuper
void onDone({bool dequeue = false, Data? result}) {
  this.result = result;
  doneTime = DateTime.now();
  state = UserTaskState.done;
  AppTaskController().done(id, result);
  if (dequeue) AppTaskController().dequeue(id);
  // _removeExecutor();
}