copy method

Future<void> copy()

Copies the selected text to the clipboard.

Implementation

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