ClipboardItem class

The interface of the Clipboard API represents a single item format, used when reading or writing data via the Clipboard API. That is clipboard.read() and clipboard.write() respectively. The benefit of having the interface to represent data, is that it enables developers to cope with the varying scope of file types and data easily. Access to the contents of the clipboard is gated behind the Permissions API: The clipboard-write permission is granted automatically to pages when they are in the active tab. The clipboard-read permission must be requested, which you can do by trying to read data from the clipboard.

Note: To work with text see the Clipboard.readText() and Clipboard.writeText() methods of the Clipboard interface. Note: You can only pass in one clipboard item at a time.

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

ClipboardItem(dynamic items, [ClipboardItemOptions? options])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited