editTask method
Future<bool> editTask (String taskId)
This function updates the task.
The function uses editTask
method provided by Task Services.
params:
taskId
: id of the task that needs to be updated.
Implementation
Future<bool> editTask(String taskId) async {
final deadline = DateTime(
taskEndDate.year,
taskEndDate.month,
taskEndDate.day,
taskEndTime.hour,
taskEndTime.minute,
);
return _taskService.editTask(
title: taskTitleTextController.text,
description: taskDescriptionTextController.text,
deadline: deadline.microsecondsSinceEpoch.toString(),
taskId: taskId,
);
}