moveInto method

Future<void> moveInto(
  1. VFolder ent,
  2. VEntity dragged
)

Implementation

Future<void> moveInto(VFolder ent, VEntity dragged) async {
  List<VEntity> sel = selection.value;

  if (!sel.contains(dragged)) {
    sel.add(dragged);
  }

  if (sel.contains(ent)) {
    sel.remove(ent);
  }

  for (VEntity i in sel) {
    await move(i, ent);
  }

  selection.add([]);
  update();
}