next method

bool next()

Moves to the next track in the playlist

Returns true if successful, false if at the end of the playlist

Implementation

bool next() {
  if (_sources.isEmpty || _currentIndex >= _sources.length - 1) {
    return false;
  }

  _currentIndex++;
  _notifyIndexChanged();
  return true;
}