clear method Null safety

  1. @override
void clear()
override

Removes all the elements from this queue.

Implementation

@override
void clear() {
  _modificationCount++;
  _queue = const [];
  _length = 0;
}