canUndo method

  1. @override
bool canUndo()
override

Implementation

@override
bool canUndo() {
  // we are at the beggining, therefore there aren't any events, so we can't
  // undo
  if (_eventCursor.value is None) {
    return false;
  }

  final previous = _eventCursor.previous;
  assert(previous != null);
  return true;
}