Skip to content
pubscout

win32_clipboard

2.0.3, released 7 months ago by halildurmus.dev

Type‑safe Dart API for reading, writing and monitoring the Windows clipboard.

$ flutter pub add win32_clipboard
Source repository

What it does

Provides high‑level functions to get/set text, file lists and custom data on the Windows clipboard. Includes a stream‑based monitor for clipboard change notifications, all built on top of win32 FFI.

AI-written summary of version 2.0.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need clipboard access in a Windows‑only Flutter or Dart desktop app
  • You want a type‑safe, high‑level API without handling raw Win32 calls
  • You need real‑time clipboard change notifications

Skip it when

  • Your app targets iOS, Android, Web or other non‑Windows platforms
  • You prefer a pure‑Dart solution without native dependencies

Strengths

  • Type‑safe, high‑level abstraction over Win32 clipboard
  • Stream‑based change monitoring without blocking the main isolate
  • Supports text, file lists and custom formats

Weaknesses

  • Works only on Windows
  • Requires win32 FFI and native build steps

Setup

Kind
FFI (native library)
Effort
Low
Code generation
No
Direct dependencies
4
import 'package:win32_clipboard/win32_clipboard.dart';

void main() async {
  Clipboard.setText('Hello, clipboard!');
  final text = Clipboard.getText();
  print(text);

  final monitor = ClipboardChangeMonitor();
  await monitor.start();
  monitor.events.listen((_) => print('Clipboard changed'));
  // ...
  await monitor.close();
}

Alternatives

Packages that do the same job and could replace win32_clipboard.

  • pubspec_parse

    Parse pubspec.yaml files with a type‑safe API and detailed error reporting.

  • deep_pick

    Type-safe API for manual JSON parsing with useful error messages.

  • dart_either

    Either monad for Dart and Flutter supporting type-safe error handling and railway-oriented programming.

  • pubspec_manager

    Type-safe API to read, modify, and write pubspec.yaml while preserving comments.

Works with

Packages commonly used together with win32_clipboard: ones it builds on, ones built on it, and its own family.