delete method

bool delete()

Deletes the complete grapheme at the cursor.

Implementation

bool delete() {
  if (cursorAtEnd) return false;
  final end = _boundaries.firstWhere((p) => p > _cursorPosition);
  _replace(textBeforeCursor + text.substring(end), _cursorPosition);
  return true;
}