execute method
void
execute(
- KanbanColumn source,
- int sourceIndex,
- KanbanColumn destination, [
- int? destinationIndex,
Moves a task from the source column to the destination column.
Notifies listeners with a TaskMovedEvent when successful.
Parameters:
source: The source columnsourceIndex: The index of the task in the source columndestination: The destination columndestinationIndex: 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));
}