setDragMode method

void setDragMode()

set the current drag Drop Mode according to current Keys Pressed e.g. if the users presses the SHIFT key, the drop Mode is set to move if allowed

Implementation

void setDragMode() {
  if (HardwareKeyboard.instance.isControlPressed) {
    if (dropModeAllowed == MhDropModeAllowed.copy ||
        dropModeAllowed == MhDropModeAllowed.copyAndMove) {
      dropMode = MhDropMode.copy;
    }
  } else if (HardwareKeyboard.instance.isShiftPressed) {
    if (dropModeAllowed == MhDropModeAllowed.copy ||
        dropModeAllowed == MhDropModeAllowed.copyAndMove) {
      dropMode = MhDropMode.move;
    }
  }
}