update Task
Updates an existing Task with new properties.
To update a task, modify the desired properties directly on the Task object before calling this method. For example, you can change the title, content, completion status, or category. The task must already exist, meaning it should have a valid ID.
You can also update the task's position within its category using the optional newPosition parameter.
Once the update is applied, the tasks property will automatically reflect the latest state.
Example usage:
val updated = task.copy(title = "New title", done = true, categoryId = "new_category_id")
val result = updateTask(updated, newPosition = 2)
if (result.isSuccess) {
// Task was updated successfully
}Return
A RainbowResult containing Unit on success, or a com.ale.infra.rest.listeners.Failure on error.
Parameters
The task to update. It should already contain the changes you want to apply, and must have a valid ID.
Optional new position of the task within its category. Defaults to null (no change).