搜尋套件、儲存庫與 APP 分類

GitHub 儲存庫leanflutter/clipboard_watcher

剪貼簿監視器

此外掛程式允許 Flutter 應用程式監視剪貼簿變更。

剪貼簿監視器 專案封面
星標
60
分支
21
最近推送(UTC)
2026年9月19日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

🚀 Ship Your App Faster: Try Fastforge - The simplest way to build, package and distribute your Flutter apps.

clipboard_watcher

pub version All Contributors

This plugin allows Flutter apps to watch clipboard changes.


English | 简体中文


Platform Support

Platform Support
Linux ✔️ Fully supported
macOS ✔️ Fully supported
Windows ✔️ Fully supported
iOS 14+ Needs user permission to read data copied from others apps
Old versions are fully supported out of the box
Android 10+ Only works when the app is in the foreground
Old versions are fully supported out of the box

Quick Start

Installation

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

dependencies:
  clipboard_watcher: ^0.2.0
Usage
class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> with ClipboardListener {
  @override
  void initState() {
    clipboardWatcher.addListener(this);
    // start watch
    clipboardWatcher.start();
    super.initState();
  }

  @override
  void dispose() {
    clipboardWatcher.removeListener(this);
    // stop watch
    clipboardWatcher.stop();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    // ...
  }

  @override
  void onClipboardChanged() async {
    ClipboardData? newClipboardData = await Clipboard.getData(Clipboard.kTextPlain);
    print(newClipboardData?.text ?? "");
  }
}

Please see the example app of this plugin for a full example.

Who's using it?

  • Biyi - A convenient translation and dictionary app.

Contributors

LiJianying
LiJianying

💻
Ademar
Ademar

💻
Amritpal Singh
Amritpal Singh

💻
J-P Nurmi
J-P Nurmi

💻
Leo Peng
Leo Peng

💻
Add your contributions

License

MIT

LeanFlutter GitHub avatar
GitHub 作者

LeanFlutter ↗

To make the flutter even simpler

語言C++CMakeSwiftRubyKotlinDartCObjective-C

分類

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項

  • flutter{"sdk":"flutter"}
  • dependency_validator開發依賴^3.2.3
  • mostly_reasonable_lints開發依賴^0.1.2

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗