remove method Null safety

bool remove(
  1. E entry
)

Removes entry from the linked list.

Returns false and does nothing if entry is not in this linked list.

This is equivalent to calling entry.unlink() if the entry is in this list.

Implementation

bool remove(E entry) {
  if (entry._list != this) return false;
  _unlink(entry); // Unlink will decrement length.
  return true;
}