removeLast method

void removeLast(
  1. T item
)

Remove the last occurrence of item from the list.

Implementation

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