goToPrevMatch method

Future<int> goToPrevMatch()

Go to the previous match.

Implementation

Future<int> goToPrevMatch() async {
  if (_currentIndex == null) {
    _currentIndex = _matches.length - 1;
    return await goToMatchOfIndex(_currentIndex!);
  }
  if (_currentIndex! > 0) {
    _currentIndex = _currentIndex! - 1;
    return await goToMatchOfIndex(_currentIndex!);
  }
  return -1;
}