Skip to main content

clipboard_file 0.1.1 copy "clipboard_file: ^0.1.1" to clipboard
clipboard_file: ^0.1.1 copied to clipboard

Read and copy files from the system clipboard on iOS and Android, including images, PDFs, Office documents, and CSV.

clipboard_file #

Read and copy files from the system clipboard on iOS and Android.

Supports pasted images, PDFs, Office documents, CSV, and other common file types while leaving plain-text clipboard content available for normal text paste.

Features #

  • ClipboardFileReader.readFile() — read a file or image from the clipboard (returns null for plain text)
  • ClipboardFileReader.copyImage() — copy PNG/JPEG bytes to the clipboard

Usage #

dependencies:
  clipboard_file: ^0.1.0
import 'package:clipboard_file/clipboard_file.dart';

final file = await ClipboardFileReader.readFile();
if (file != null) {
  print('${file.fileName ?? 'unnamed'}.${file.extension}');
}

await ClipboardFileReader.copyImage(pngBytes);

Platform notes #

  • iOS: Uses UIPasteboard, NSItemProvider, and suggestedName for original filenames.
  • Android: Reads content:// URIs from the clipboard. CSV files copied as files are attached; copied cell content still pastes as text.

Publishing #

dart pub publish --dry-run
dart pub publish

Update homepage, repository, and issue_tracker in pubspec.yaml with your GitHub username before publishing.

2
likes
0
points
651
downloads

Publisher

unverified uploader

Weekly Downloads

Read and copy files from the system clipboard on iOS and Android, including images, PDFs, Office documents, and CSV.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on clipboard_file

Packages that implement clipboard_file