activatePrevious method

void activatePrevious()

Activates previous element in the list, if the active item is not already the first item.

Implementation

void activatePrevious() {
  if (_items.isEmpty) {
    _activeIndex = -1;
  } else if (_activeIndex > 0) {
    _activeIndex--;
  } else if (_loop) {
    _activeIndex = _items.length - 1;
  }
  _modelChanged.add(null);
}