removeTaskAsap method
- String taskId
Removes a task ASAP.
Returns true if managed to remove the task immediately. Returns false if the task will be removed next time it's possible.
Implementation
Future<bool> removeTaskAsap(String taskId) async {
final String? status = DaoInstantString(
localDatabase,
).get(taskIdToErrorDaoInstantStringKey(taskId));
if (status == taskStatusStarted) {
// that value will be detected later
await _setTaskErrorStatus(taskId, taskStatusStopAsap);
return false;
}
await _finishTask(taskId);
return true;
}