reorder method

List<T> reorder(
  1. int oldIndex,
  2. int newIndex
)

Implementation

List<T> reorder(int oldIndex, int newIndex) {
  final newList = List<T>.from(this);
  final item = newList.removeAt(oldIndex);
  newList.insert(newIndex, item);
  return newList;
}