removeFirst method Null safety

T removeFirst()

Removes and returns the first object in this list.

The list must be growable and non-empty.

Implementation

T removeFirst() {
  assert(isNotEmpty);

  final _first = first;
  removeAt(0);
  return _first;
}