getNext method

String? getNext()

Implementation

String? getNext() {
  if (_history.isEmpty) return null;
  _currentIndex = (_currentIndex < _history.length)
      ? _currentIndex + 1
      : _history.length;
  return _currentIndex < _history.length ? _history[_currentIndex] : "";
}