copyText

abstract fun copyText(label: String, text: String, isSensitive: Boolean = false)(source)

Writes text to the clipboard under label.

Safe to call from the main thread: the write is one quick call to the clipboard service.

Parameters

isSensitive

Hides the text in the system's clipboard preview.

Throws

when the clipboard is unavailable or rejects the write.