remove method
Removes the first occurrence of value
from this slice.
Returns true if value
was in the slice, false otherwise. The slice must be growable.
Note, the ranges of other slices on the underlying list will not change, therefore use with care as this may shift the underlying data in other slices.
Implementation
@override
bool remove(Object? value) {
if (value is! T) {
return false;
}
final index = indexOf(value);
if (index == -1) {
return false;
}
removeAt(index);
return true;
}