execute method

void execute(
  1. KanbanColumn source,
  2. int sourceIndex,
  3. KanbanColumn destination, [
  4. int? destinationIndex,
])

Moves a task from the source column to the destination column.

Notifies listeners with a TaskMovedEvent when successful.

Parameters:

  • source: The source column
  • sourceIndex: The index of the task in the source column
  • destination: The destination column
  • destinationIndex: Optional index in the destination column

Implementation

void execute(KanbanColumn source, int sourceIndex, KanbanColumn destination, [int? destinationIndex]) {
  final task = source.tasks[sourceIndex];
  source.moveTaskTo(sourceIndex, destination, destinationIndex);
  EventNotifier().notify(TaskMovedEvent(task, source, destination));
}