removeFirstFromHistory method

HistoryElement? removeFirstFromHistory()

Removes the last HistoryElement from history and returns it.

Implementation

HistoryElement? removeFirstFromHistory() {
  if (history.isEmpty) {
    return null;
  }
  return history.removeAt(0);
}