removeFirst method

T? removeFirst()

Remove and return highest priority item

Implementation

T? removeFirst() {
  if (_heap.isEmpty) return null;
  final first = _heap.first;
  _heap.remove(first);
  return first;
}