clipboard_watcher
clipboard_watcher copied to clipboard
Unable to open clipboard but the clipboard is correct?
onClipboardChanged: Unhandled Exception: PlatformException(Clipboard error, Unable to open clipboard, 5, null)
but the clipboard does print? what is this error for?
@override
void onClipboardChanged() async {
ClipboardData? newClipboardData =
await Clipboard.getData(Clipboard.kTextPlain);
print(newClipboardData?.text ?? "");
}