setcanDrag method

void setcanDrag({
  1. required bool value,
  2. required int itemIndex,
  3. required int listIndex,
})

Implementation

void setcanDrag(
    {required bool value, required int itemIndex, required int listIndex}) {
  board.isElementDragged = value;
  board.isListDragged = value;
  move = "";
  if (!value) return;
  var item = board.lists[listIndex].items[itemIndex];
  draggedItemState = DraggedItemState(
      child: item.child,
      listIndex: listIndex,
      itemIndex: itemIndex,
      height: item.height!,
      width: item.width!,
      x: item.x!,
      y: item.y!);
  notifyListeners();
}