removeAt method

T? removeAt(
  1. int index
)

Implementation

T? removeAt(int index) {
  if (index < 0 || index >= list.length) return null;

  final currentList = List<T>.from(list);
  final removed = currentList.removeAt(index);
  value = currentList;
  return removed;
}