ClipboardManager class
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
-
addListener(
ClipboardListener listener) → void -
checkAccessibility(
) → Future< bool> - Check for accessibility permission. Accessibility permission is used to monitor changes in the top activity to determine which app the content was copied from.
-
checkIsRunning(
) → Future< bool> - check listener running status
-
checkPermission(
EnvironmentType env) → Future< bool> - Check if there is permission (only Android/IOS)
-
copy(
ClipboardContentType type, String content) → Future< bool> - copy self content to clipboard,only support text and image
-
getCurrentEnvironment(
) → Future< EnvironmentType> - getCurrentEnvironment (only Android)
-
getLatestWriteClipboardSource(
) → Future< ClipboardSource?> - Get the latest source written to the clipboard, but accuracy is not guaranteed On Android, it is based on shell scripts and may be time-consuming
-
getSelectedFiles(
) → Future< SelectedFilesResult> - get files selected by user in the explorer (only Windows and not desktop folder)
-
getShizukuVersion(
) → Future< int?> - get the version for Shizuku. (Only Android)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pasteToPreviousWindow(
[int keyDelayMs = 100]) → Future< void> -
send Ctrl + V to previous Window
Ensure storeCurrentWindowHwnd is called before pasting clipboard data into the previous window.
keyDelayMs
The interval duration of each key, if the duration is too short, the combination key may not work properly -
removeListener(
ClipboardListener listener) → void -
requestAccessibility(
) → Future< void> - Request accessibility permission. Accessibility permission is used to monitor changes in the top activity to determine which app the content was copied from.
-
requestPermission(
EnvironmentType env) → Future< void> - request permission (only Android/IOS)
-
setTempFileDir(
String dirPath) → Future< void> - end with '/' or ''
-
startListening(
{NotificationContentConfig? notificationContentConfig, EnvironmentType? env, ClipboardListeningWay? way}) → Future< bool> -
start listening clipboard change event
title
notification title textdesc
notification description textenv
the listening mode you want to enable.The options are either a or b. If null, it will automatically select based on the current environment. -
stopListening(
) → Future< bool> - stop listening clipboard
-
storeCurrentWindowHwnd(
) → Future< void> - Save the hwnd of the current window and use it in conjunction with pasteToPreviousWindow method
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → ClipboardManager
-
final