Provides a set of methods and properties for interacting with the Windows Clipboard.
Constructors
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
Static Properties
-
formats
→ List<
ClipboardFormat> -
Retrieves a list of available
ClipboardFormat
s in the clipboard.no setter - hasText → bool
-
Checks if the clipboard contains text data.
no setter
- isEmpty → bool
-
Checks if the clipboard is empty.
no setter
- numberOfFormats → int
-
Gets the number of different data formats currently on the clipboard.
no setter
Static Methods
-
clear(
) → bool - Clears the contents of the clipboard.
-
getData(
ClipboardFormat format) → String? -
Retrieves data from the clipboard in the specified
format
. -
getPriorityFormat(
List< ClipboardFormat> formats) → ClipboardFormat? -
Retrieves the first available clipboard format from a list of
formats
. -
getText(
) → String? - Retrieves text data from the clipboard.
-
hasFormat(
ClipboardFormat format) → bool -
Checks if the clipboard contains data in the specified
format
. -
registerFormat(
String name) → int -
Registers a clipboard format with the given
name
and returns its ID. -
setData(
String data, {required ClipboardFormat format}) → bool -
Stores the provided
data
on the clipboard in the specifiedformat
. -
setText(
String text) → bool -
Stores the provided
text
on the clipboard as plain text.