clipboard_plus 1.0.4
clipboard_plus: ^1.0.4 copied to clipboard
A Flutter plugin for enhanced clipboard functionality with iOS UIPasteboard support.
1.0.4 #
hasUrls()now detects links copied as plain text. On iOS it wasUIPasteboard.hasURLsonly, which is false for text such asnavigator.clipboard.writeTextoutput or most "Copy" buttons; it now also runsdetectPatternsforprobableWebURL(iOS 14+), still without the paste permission dialog.getContentTypes().hasUrlsmatches.- Android
hasUrls()avoids reading the clip on Android 12+ when the system has classified it (ClipDescription.getConfidenceScore(TYPE_URL)), so the "pasted from your clipboard" notice is not shown for the check. getUrl()on iOS trims surrounding whitespace before parsing.- Android unit tests replaced (the template test called a non-existent method); mockito-core bumped to 5.14.2 for JDK 21.
1.0.3 #
- Updated documentation
1.0.2 #
- Fixed README image not displaying on pub.dev by using raw GitHub URL
1.0.1 #
- Added iOS paste permission dialog screenshot to README
1.0.0 #
Initial release of clipboard_plus.
Features #
-
Content Type Detection: Check clipboard contents without triggering iOS paste permission dialog
getContentTypes()- Get all content type flags at oncehasUrls()- Check for URLshasStrings()- Check for text contenthasImages()- Check for imageshasColors()- Check for colors (iOS only)
-
Content Reading: Retrieve clipboard data
getUrl()- Get URL from clipboardgetText()- Get text from clipboardgetImage()- Get image as PNG bytes
-
Content Writing:
setText()- Copy text to clipboardclear()- Clear clipboard contents
-
ClipboardContentType: Data class with boolean flags for each content type
Platform Support #
- iOS: Full support using UIPasteboard APIs
- Android: Full support using ClipboardManager APIs (colors not supported)