removeLastFromHistory method

HistoryElement? removeLastFromHistory()

Removes the last HistoryElement from history and returns it.

Implementation

HistoryElement? removeLastFromHistory() {
  if (history.isEmpty) {
    return null;
  }
  return history.removeLast();
}