win32_clipboard 2.0.3 copy "win32_clipboard: ^2.0.3" to clipboard
win32_clipboard: ^2.0.3 copied to clipboard

A modern, type-safe Dart API for accessing and managing the Windows Clipboard.

Changelog #

All notable changes to this project will be documented in this file.

2.0.3 - 2026-04-11 #

📦 Dependencies #

  • Lower minimum Dart SDK to 3.10.

2.0.2 - 2026-02-27 #

🏠 Repository #

2.0.1 - 2026-02-26 #

📦 Dependencies #

  • Allow package:meta versions from 1.17.0 up to but not including 2.0.0 to ensure compatibility with a wider range of Dart SDK versions.

2.0.0 - 2026-02-26 #

🔄 Breaking Changes #

The clipboard change notification API has been redesigned around the new ClipboardChangeMonitor class.

  • Removed the top-level Clipboard.onClipboardDataChanged stream.
  • Removed Clipboard.onDataChanged(), Clipboard.onFileListChanged, and Clipboard.onTextChanged.

Migrate by creating a ClipboardChangeMonitor instance and using its equivalent streams:

// Before
onClipboardDataChanged.listen((_) { ... });
Clipboard.onDataChanged(format).listen((format) { ... });
Clipboard.onFileListChanged.listen((files) { ... });
Clipboard.onTextChanged.listen((text) { ... });

// After
final monitor = ClipboardChangeMonitor();
await monitor.start();
monitor.events.listen((_) { ... });
monitor.onDataChanged(format).listen((format) { ... });
monitor.onFileListChanged.listen((files) { ... });
monitor.onTextChanged.listen((text) { ... });
// Call monitor.close() when done.

📦 Dependencies #

  • Bumped minimum required Dart SDK version to 3.11.0.

1.0.0 - 2024-10-28 #

🎉 First Stable Release 🚀 #

This release marks the first stable release of the win32_clipboard package, offering a refined and feature-rich API for interacting with the Windows Clipboard in Dart.

🔄 Breaking Changes #

  • Clipboard:
    • getData: Now returns ClipboardData? instead of String?.
    • setData: Now takes a ClipboardData instance as the only argument.
    • registerFormat: Now returns ClipboardFormat instead of int.
  • ClipboardFormat:
    • formatId field renamed to id.
    • name: The optional named parameter name is now a required positional parameter and is no longer nullable.
    • text: Constant renamed to unicodeText.

✨ New Features #

  • Clipboard File List Support:

    • Added Clipboard.getFileList() to retrieve a list of files from the clipboard.
    • Added Clipboard.setFileList() to set a list of files on the clipboard.
    • Added Clipboard.hasFileList getter to check if the clipboard contains file list data.
    • Added ClipboardFormat.fileList constant for identifying the file list format.
  • Data Change Listeners:

    • Added Clipboard.onDataChanged(ClipboardFormat format) to listen for changes in specific clipboard formats.
    • Added Clipboard.onFileListChanged getter to listen for file list changes.
    • Added Clipboard.onTextChanged getter to listen for text changes.
  • New Data Types:

    • Introduced ClipboardData as a base class for clipboard data.
    • Added subclasses:
      • FileListData for handling file lists.
      • PointerData for handling pointer-based data.
      • UnicodeTextData for handling Unicode text data.

🛠 Improvements #

  • Refined API to be more intuitive and consistent across all clipboard operations.
  • Optimized internal structure for better performance and reliability.

🚨 Dart SDK Requirement #

  • Bumped the minimum required Dart SDK version to 3.5.0.

0.1.3 #

  • Bump minimum required Dart SDK version to 3.4.0

0.1.2 #

  • Fix deprecation warnings
  • Update links
  • Bump minimum required Dart SDK version to 3.3.0

0.1.1 #

  • Improved documentation.

0.1.0 #

  • Initial version.
14
likes
160
points
333
downloads

Documentation

API reference

Publisher

verified publisherhalildurmus.dev

Weekly Downloads

A modern, type-safe Dart API for accessing and managing the Windows Clipboard.

Repository (GitHub)
View/report issues
Contributing

Topics

#clipboard #win32 #ffi #windows

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (license)

Dependencies

ffi, ffi_leak_tracker, meta, win32

More

Packages that depend on win32_clipboard