clippy 0.2.0

  • Installing
  • Versions
  • 85

Clippy — Access system clipboard in Dart (Server & Browser)

Pub Build Status Build status

A library to access the clipboard (copy/paste) for server and browser


Add clippy to dependencies/dev_dependencies in in your pubspec.yaml



In the server Clippy supports writing and reading from the clipboard. It uses system tools for this:

  • On linux uses xsel (Install if needed)
  • On Mac uses pbcopy/pbpaste
  • On windows it embeds a copy/paste tool win-clipboard
import 'package:clippy/server.dart' as clippy;

main() async {
  // Write to clipboard
  await clippy.write('');
  // Read from clipboard
  final clipboard = await;  

See example/server


In the browser Clippy supports writing and listening to paste events.

import 'package:clippy/browser.dart' as clippy;

main() async {
  // Write a string to clipboard
  await clippy.write('');
  // Write text from an element to clipboard
  await clippy.write(element);
  // Write current selection to clipboard
  await clippy.write();
  // Listen to paste event
  clippy.onPaste.listen((text) => print('OnPaste: $text'));

See example/web



  • copy now returns a Future<bool>
  • Better error handling


  • Initial version, works on Linux, Osx, Windows and Browser

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  clippy: "^0.2.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:clippy/browser.dart';

      import 'package:clippy/server.dart';
Version Uploaded Documentation Archive
0.2.0 Jul 16, 2017 Go to the documentation of clippy 0.2.0 Download clippy 0.2.0 archive
0.1.0 Jul 15, 2017 Go to the documentation of clippy 0.1.0 Download clippy 0.1.0 archive


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
75 / 100
Code health derived from static analysis. [more]
94 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: web

Platform components identified in package: html, io.


  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 10 hints.

    Run dartfmt to format lib/src/server.dart.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use clippy.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
path ^1.4.2 1.6.1
Dev dependencies
browser any
test ^0.12.0