move method

void move(
  1. int from,
  2. int to
)

Implementation

void move(int from, int to) {
  final snapshot = [for (var slot = 0; slot < _ids.length; slot++) _readSlot(slot)];
  snapshot.insert(to, snapshot.removeAt(from));
  _ids.insert(to, _ids.removeAt(from));
  for (var slot = 0; slot < snapshot.length; slot++) {
    _writeSlot(slot, snapshot[slot]);
  }
  _form.finalizeArray(name);
}