removeFirst method

void removeFirst(
  1. T item
)

Remove the first occurrence of item from the list.

Implementation

void removeFirst(T item) {
  final index = indexOf(item);
  if (index == -1) return;
  removeAt(index);
}