addToTop method

void addToTop(
  1. T item
)

Adds an item to the top of the list.

Implementation

void addToTop(T item) {
  _oldItems.add(item);
  _lastAddedToBottom = false;
  notifyListeners();
}