revert method

bool revert()

Reverts changes if possible (except isNew) and returns true if successful.

Implementation

bool revert() {
  if (!isChanged || isNew) return false;
  if (deleting) deleting = false;
  if (isChanged)
    throw UnimplementedError('A note has a state that cannot be reverted.');
  return true;
}