clipboard_watcher icon indicating copy to clipboard operation
clipboard_watcher copied to clipboard

Enable image support and listen for clipboard changes when an image is copied.

Open KodeBarista opened this issue 2 years ago • 1 comments

Enhance clipboard support by enabling the detection of clipboard changes when an image is copied to the clipboard. Currently, the existing clipboard supports text-based operations.

A method extending the current functionality would be helpful dealing with image data.

@override
void onImageCopied(){
     debugPrint('Image has been copied'); 
}

KodeBarista avatar Feb 08 '24 15:02 KodeBarista

clipboard_watcher is being retired. The replacement is nativeapi: ClipboardChangedEvent reports clipboard changes, including image changes, and Clipboard.readImageAsync() reads the current raster image. Native text, HTML, files and multi-format operations are also available. Mobile delivery/read access remains subject to OS focus, paste permission and sandbox rules.

Clipboard support is prepared for nativeapi 0.5.3; use the source checkout until that version is published (0.5.2 lacks this API). Replacement code and platform details: https://github.com/libnativeapi/nativeapi/blob/main/website/content/docs/en/migrate-clipboard-watcher.md

Closing as part of clipboard_watcher's retirement; further clipboard work belongs in nativeapi.

lijy91 avatar Oct 11 '26 04:10 lijy91