FLUTTER ECOSYSTEM

flutter-moum/flutter_screenshot_callback

一個 Flutter 插件,可在 iOS 和 Android 上檢測行動裝置截圖並執行回呼函數。🚀

flutter_screenshot_callback 專案封面
Stars
110
Forks
173
最近推送(UTC)
2024年6月13日
專案狀態
未封存
Flutter Moum GitHub avatar
GITHUB Organization

Flutter Moum ↗

語言KotlinDartJavaRubySwiftObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}

原始 README

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

展開 / 收合專案 README

Screenshot Callback

Flutter plugin that allows you to detect mobile screenshot and execute callback functions on iOS and Android. 🚀

https://img.shields.io/pub/v/screenshot_callback.svg https://img.shields.io/github/license/flutter-moum/flutter_screenshot_callback

UsageIssues and FeedbackAuthorLicense

Feedback welcome and Pull Requests are most welcome!

Usage

Import the package

To use this plugin, follow the plugin installation instructions.

Use the plugin

Add the following import to your Dart code:

import 'package:screenshot_callback/screenshot_callback.dart';

Initialize ScreenshotCallback with the scopes you want:

ScreenshotCallback screenshotCallback = ScreenshotCallback();
addListener

Then invoke addListener method of ScreenshotCallback. Add custom functions that you want to excute after detect screenshot. e.g:

screenshotCallback.addListener(() {
  //Void funtions are implemented
  print('detect screenshot');
});
dispose

You need to call dispose method to terminate ScreenshotCallback before you exit the app e.g:

screenshotCallback.dispose();

Issues and Feedback

Please file issues to send feedback or report a bug. Thank you !

Author

License

MIT