done method
Marks the UserTask with id as done, with an optional result.
A done task stays on the queue. Use dequeue to remove it. Usually called through UserTask.onDone.
Implementation
void done(String id, [Data? result]) {
UserTask? userTask = _userTaskMap[id];
if (userTask == null) {
warning("$runtimeType - Could not find User Task - id is not valid: '$id'");
} else {
userTask.state = UserTaskState.done;
userTask.doneTime = DateTime.now();
userTask.result = result;
_controller.sink.add(userTask);
info('$runtimeType - Marked $userTask as done');
notificationManager.cancelTaskNotification(userTask);
}
}