cut method
Implementation
@override
TextEditingValue? cut(ZefyrController controller, String plainText) {
if (!controller.selection.isCollapsed) {
final data = controller.selection.textInside(plainText);
// ignore: unawaited_futures
Clipboard.setData(ClipboardData(text: data));
controller.replaceText(
controller.selection.start,
data.length,
'',
selection: TextSelection.collapsed(offset: controller.selection.start),
);
return TextEditingValue(
text: controller.selection.textBefore(plainText) +
controller.selection.textAfter(plainText),
selection: TextSelection.collapsed(offset: controller.selection.start),
);
}
}