v0.3.0
clipboard_watcher
此外掛程式允許 Flutter 應用程式監視剪貼簿變更。
43喜歡 3880近 30 天下載140Pub 分數
AndroidiOSmacOSWindowsLinux
此外掛程式允許 Flutter 應用程式監視剪貼簿變更。
以下為英文專案原文快照,最新內容請造訪 GitHub。
🚀 Ship Your App Faster: Try Fastforge - The simplest way to build, package and distribute your Flutter apps.
This plugin allows Flutter apps to watch clipboard changes.
English | 简体中文
| 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 |
Add this to your package's pubspec.yaml file:
dependencies:
clipboard_watcher: ^0.2.0
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.
LiJianying 💻 |
Ademar 💻 |
Amritpal Singh 💻 |
J-P Nurmi 💻 |
Leo Peng 💻 |
||
|
|
||||||
依賴清單 3 項
{"sdk":"flutter"}^3.2.3^0.1.2先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗