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

套件詳情v1.0.1

screen_capture_utils

一個用於處理 Android 和 iOS 設備上的螢幕擷取事件的外掛

AndroidiOS
近 30 天下載
11
喜歡數
18
Pub 分數
150

安裝套件

flutter pub add screen_capture_utils

套件介紹

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

一個 Flutter 插件,可在 Android 和 iOS 裝置上啟用螢幕擷取事件的偵測與處理。它允許應用程式在使用者截圖或錄製畫面時做出回應,這對於保護敏感內容非常有用。該插件提供簡單的 API 來監聽這些事件,並觸發適當的操作,例如顯示警告或停用某些功能。它支援兩大主要行動平台,並能順暢整合至現有的 Flutter 專案中。

適用情境

  • 保護敏感的UI內容
  • 檢測未經授權的截圖
  • 實現類似DRM的行為
  • 增強應用安全性
  • 監控螢幕錄製活動

主要特色

  • 跨平台支援(Android 與 iOS)
  • 螢幕擷取事件監聽器
  • 與 Flutter 的簡單整合
  • 即時捕獲檢測
  • 所需的設定最少

適合對象

  • 注重安全的應用程式
  • 內容保護應用
  • 包含機密資料的應用程式
  • 教育或企業軟體
  • 數位版權管理實作

使用建議

  • 僅限檢測捕獲事件,無法防止它們
  • 行為可能因設備製造商而異
  • 無法控制系統級捕獲工具
  • Android 需要權限處理
  • iOS 後台監控的限制

原始 README

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

Screen Capture Utils

A plugin to handle screen capture events on android and ios

🚀 Initialize SDK
  late ScreenCaptureUtils screenCaptureUtils;
  
  ...   
    
  screenCaptureUtils = ScreenCaptureUtils(
      // Path returns empty on iOS
      onScreenCaptured: (_) {
          print('Captured: $_');
      },
    
      /// Only on Android !!!
      isGuarding: (bool val) {
        print(val);
      },
    
      /// Only on Android !!!
      onScreenCapturedWithDeniedPermission: () {
        print('onScreenCapturedWithDeniedPermission');
      },
  )..intialize();
️🔐 Screen Guarding (Android Only)
Guard
   /// Guard Screen
  screenCaptureUtils.guard();
  • This function will apply the FLAG_SECURE to the MainActivity of your app.
UnGuard
   /// Unguard Screen
  screenCaptureUtils.unGuard();
  • This function will remove/clear the FLAG_SECURE from the MainActivity of your app.

✨ Contribution

Lots of PR's would be needed to improve this plugin. So lots of suggestions and PRs are welcome.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。