execute method

Result<Task> execute(
  1. KanbanColumn column,
  2. int index
)

Deletes a task at the specified index from the column.

Notifies listeners with a TaskRemovedEvent when successful. Returns a Result containing the removed task.

Parameters:

  • column: The column containing the task
  • index: The index of the task to delete

Implementation

Result<Task> execute(KanbanColumn column, int index) {
  final removed = column.deleteTask(index);
  EventNotifier().notify(TaskRemovedEvent(removed, column));
  return Success(removed);
}