removeFirstOccurrence method

bool removeFirstOccurrence(
  1. T element
)

Implementation

bool removeFirstOccurrence(T element) {
  final index = indexOf(element);
  if (index != -1) {
    removeAt(index);
    return true;
  }
  return false;
}