move method

void move(
  1. int oldIndex,
  2. int newIndex
)

Moves a control from oldIndex to newIndex.

Implementation

void move(int oldIndex, int newIndex) {
  if (oldIndex == newIndex) return;
  final current = List<T>.of(fields.value);
  final item = current.removeAt(oldIndex);
  current.insert(newIndex, item);
  fields.value = current;
  _arrayDirty.value = true;
}