reorderFields method

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

Implementation

void reorderFields(int oldIndex, int newIndex) {
  if (newIndex > oldIndex) {
    newIndex -= 1;
  }
  final fieldName = fieldOrder.removeAt(oldIndex);
  fieldOrder.insert(newIndex, fieldName);
  notifyFieldValue(fieldName, getValue());
}