Clipboard
interface Clipboard
Properties
val nativeClipboard: NativeClipboard
Returns the native clipboard that exposes the full functionality of platform clipboard.
Functions
suspend fun getClipEntry(): ClipEntry?
Returns the clipboard entry that's provided by the platform's ClipboardManager.
This item can include arbitrary content like text, images, videos, or any data that may be provided through a mediator. Returned entry may contain multiple items with different types.
It returns null when the clipboard is empty.
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.
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. |