public interface Clipboard
Properties
nativeClipboard
@Deprecated("Use platform-specific extension to get platform reference")
public val nativeClipboard: NativeClipboard
Returns the native clipboard that exposes the full functionality of platform clipboard.
Functions
getClipEntry
public suspend fun getClipEntry(): ClipEntry?
Returns the clipboard entry that's provided by the platform's ClipboardManager.
The entry can offer multiple representations of one item, such as plain text and HTML. Some platforms may also return entries containing multiple items. Returns null when the clipboard is empty.
Check ClipEntry.clipMetadata before reading, then read promptly: clipboard content can become unavailable even after a positive metadata check.
Calling this function on Android will access the Clipboard's contents, and the first time it happens this will trigger a warning that says "App pasted from Clipboard". Use nativeClipboard and primaryClipDescription on Android to circumvent this issue if you are only interested in querying what is available in the clipboard.
setClipEntry
public suspend fun setClipEntry(clipEntry: ClipEntry?)
Puts the given clipEntry in platform's ClipboardManager.
Parameters
| clipEntry | Platform specific clip object that either holds data or links to it. Pass null to clear the clipboard. |