cut method

Future<void> cut()

Copies the selected text to the clipboard and removes it from the text.

Implementation

Future<void> cut() async {
  if (hasSelection) {
    await Clipboard.setData(selection!.textInRange(_text));
    deleteSelection();
  }
}