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

套件詳情v3.0.1

screenshot_callback

可在 iOS 與 Android 上偵測行動裝置截圖並執行回呼函數的 Flutter 插件。

AndroidiOS
近 30 天下載
7060
喜歡數
101
Pub 分數
150

安裝套件

flutter pub add screenshot_callback

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

screenshot_callback 套件是一個 Flutter 外掛程式,可在 Android 與 iOS 裝置上偵測行動裝置截圖。當拍攝截圖時,它會觸發回呼函數,讓開發者能動態回應——例如暫停敏感內容或記錄事件。此套件專為跨平台相容性設計,可無縫整合至現有的 Flutter 應用程式中,無需變更原生程式碼。該套件利用平台特定的 API,高效且可靠地監控截圖活動。

適用情境

  • 檢測使用者在敏感應用中截圖的時機
  • 在檢測到截圖時觸發安全措施
  • 記錄截圖事件以用於分析
  • 防止未經授權的螢幕截圖
  • 在截圖後啟用響應式 UI 調整

主要特色

  • Android 與 iOS 的跨平台支援
  • 在偵測到截圖時執行簡單回調
  • 使用 pub add 命令進行最小化設定
  • 安全且輕量的實作
  • 不需要修改原生程式碼

適合對象

  • 需要截圖保護的應用
  • 注重安全的應用程式
  • 教育或考試類環境
  • 需要使用追蹤的內容提供者
  • 開發注重隱私功能的開發者

使用建議

  • Android 上需要適當的權限
  • 僅限偵測截圖,無法防止截圖
  • 可能無法在所有裝置型號或作業系統版本上運作
  • 行為在 iOS 與 Android 之間可能有所差異
  • 無法保證在所有情境下100%的檢測準確度

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Screenshot Callback

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

Usage • Issues and Feedback • Author • License

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

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。