remove method

IList<T> remove(
  1. T item
)

Removes the first occurrence of item from this IList.

IList<String> parts = ["head", "shoulders", "knees", "toes"].lock;
parts.remove("head");
parts.join(", ");     // "shoulders, knees, toes"

The method has no effect if item was not in the list.

Implementation

IList<T> remove(T item) {
  final L<T> result = _l.remove(item);
  return identical(result, _l) ? this : IList<T>._unsafe(result, config: config);
}