{"id":22458778,"url":"https://github.com/halildurmus/win32_clipboard","last_synced_at":"2025-08-12T13:38:54.038Z","repository":{"id":196802152,"uuid":"697287851","full_name":"halildurmus/win32_clipboard","owner":"halildurmus","description":"Interact with the Windows Clipboard.","archived":false,"fork":false,"pushed_at":"2024-11-17T13:36:45.000Z","size":156,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-11T01:53:16.988Z","etag":null,"topics":["clipboard","dart","flutter","win32","windows"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halildurmus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"halildurmus"}},"created_at":"2023-09-27T12:29:19.000Z","updated_at":"2024-11-17T13:36:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"58517303-1051-4bf3-890f-5e1bcdc3b83a","html_url":"https://github.com/halildurmus/win32_clipboard","commit_stats":null,"previous_names":["dart-windows/win32_clipboard","halildurmus/win32_clipboard"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/halildurmus/win32_clipboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwin32_clipboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwin32_clipboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwin32_clipboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwin32_clipboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halildurmus","download_url":"https://codeload.github.com/halildurmus/win32_clipboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halildurmus%2Fwin32_clipboard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270070353,"owners_count":24522042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clipboard","dart","flutter","win32","windows"],"created_at":"2024-12-06T08:14:19.044Z","updated_at":"2025-08-12T13:38:53.994Z","avatar_url":"https://github.com/halildurmus.png","language":"Dart","funding_links":["https://github.com/sponsors/halildurmus"],"categories":[],"sub_categories":[],"readme":"[![ci][ci_badge]][ci_link]\n[![Package: win32_clipboard][package_badge]][package_link]\n[![Publisher: halildurmus.dev][publisher_badge]][publisher_link]\n[![Language: Dart][language_badge]][language_link]\n[![License: BSD-3-Clause][license_badge]][license_link]\n[![codecov][codecov_badge_link]][codecov_link]\n\nA package that provides a friendly Dart API for accessing the Windows Clipboard.\n\nThis package builds on top of the Dart [win32] package, offering a high-level\nDart wrapper that avoids the need for users to understand FFI or write directly\nto the Win32 API.\n\n## Features\n\n- **Text Operations**: Easily read and write text to the clipboard.\n- **File List Operations**: Easily read and write file lists to the clipboard.\n- **Format Inspection**: Check available formats on the clipboard.\n- **Custom Formats**: Register custom clipboard formats.\n- **Clipboard Change Notifications**: Monitor changes to the clipboard contents.\n- **Clear Clipboard**: Clear the clipboard contents.\n\nTo learn more, see the [API Documentation][api_documentation_link].\n\n## Usage\n\n### Text operations\n\n```dart\nimport 'package:win32_clipboard/win32_clipboard.dart';\n\nvoid main() {\n  if (Clipboard.setText('Hello, world!')) {\n    print('Retrieved text from clipboard: \"${Clipboard.getText()}\"');\n  }\n}\n```\n\n### File list operations\n\n```dart\nimport 'package:win32_clipboard/win32_clipboard.dart';\n\nvoid main() {\n  if (Clipboard.setFileList([r'c:\\src\\file1.dart', r'd:\\file2.txt'])) {\n    print('Retrieved file list from clipboard: ${Clipboard.getFileList()}');\n  }\n}\n```\n\n### Listen for clipboard text changes\n\n```dart\nimport 'package:win32_clipboard/win32_clipboard.dart';\n\nvoid main() async {\n  // Subscribe to the clipboard text change stream.\n  final subscription = Clipboard.onTextChanged.listen((text) {\n    print('Clipboard text changed: \"$text\"');\n  }, cancelOnError: true);\n\n  print('Monitoring clipboard text changes for 30 seconds...');\n  // Now, copy some text to the clipboard to see the changes.\n\n  // Stop monitoring after 30 seconds.\n  await Future.delayed(const Duration(seconds: 30), () async {\n    await subscription.cancel();\n    print('Stopped monitoring.');\n  });\n}\n```\n\n### Retrieve a list of available clipboard formats\n\n```dart\nimport 'package:win32_clipboard/win32_clipboard.dart';\n\nvoid main() {\n  print('Clipboard has ${Clipboard.numberOfFormats} format(s)');\n  for (final format in Clipboard.formats) {\n    print('- $format');\n  }\n}\n```\n\n### Clear the clipboard\n\n```dart\nimport 'package:win32_clipboard/win32_clipboard.dart';\n\nvoid main() {\n  if (Clipboard.clear()) {\n    print('Clipboard contents cleared.');\n  }\n}\n```\n\n## Feature requests and bugs\n\nPlease file feature requests and bugs at the\n[issue tracker][issue_tracker_link].\n\n[api_documentation_link]: https://pub.dev/documentation/win32_clipboard/latest/\n[ci_badge]: https://github.com/halildurmus/win32_clipboard/actions/workflows/win32_clipboard.yml/badge.svg\n[ci_link]: https://github.com/halildurmus/win32_clipboard/actions/workflows/win32_clipboard.yml\n[codecov_badge_link]: https://codecov.io/gh/halildurmus/win32_clipboard/branch/main/graph/badge.svg?token=AM792MK0UT\n[codecov_link]: https://codecov.io/gh/halildurmus/win32_clipboard\n[issue_tracker_link]: https://github.com/halildurmus/win32_clipboard/issues\n[language_badge]: https://img.shields.io/badge/language-Dart-blue.svg\n[language_link]: https://dart.dev\n[license_badge]: https://img.shields.io/github/license/halildurmus/win32_clipboard?color=blue\n[license_link]: https://opensource.org/licenses/BSD-3-Clause\n[package_badge]: https://img.shields.io/pub/v/win32_clipboard.svg\n[package_link]: https://pub.dev/packages/win32_clipboard\n[publisher_badge]: https://img.shields.io/pub/publisher/win32_clipboard.svg\n[publisher_link]: https://pub.dev/publishers/halildurmus.dev\n[win32]: https://pub.dev/packages/win32\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalildurmus%2Fwin32_clipboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalildurmus%2Fwin32_clipboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalildurmus%2Fwin32_clipboard/lists"}