updateTask

abstract fun updateTask(task: Task, listener: RainbowListener<Unit, Unit>? = null)

Updates the specified Task by directly modifying its properties.

To update a Task, modify its properties directly on the task object before invoking this method. The task must have a valid ID, meaning it must refer to an existing task. The following properties can be updated:

  • Category: The task's category or classification.

  • Position: The position or order of the task in a list.

  • Done status: A boolean indicating whether the task is completed.

  • Title: The title or headline of the task.

  • Text: The main content or description of the task.

Once the changes are applied, the provided listener will be invoked upon completion of the update. The taskList property will be updated automatically to reflect these changes.

Parameters

task

The Task to update. Ensure the task object reflects the desired changes and contains a valid ID before calling this method.

listener

An optional callback of type RainbowListener, which is invoked upon completion of the operation. If not required, set to null.