FLUTTER ECOSYSTEM

Zfinix/screen_capture_utils

一个用于处理 Android 和 iOS 上屏幕捕获事件的插件

screen_capture_utils 项目封面
Stars
39
Forks
3
最近推送(UTC)
2022年4月11日
项目状态
未归档
Chiziaruhoma Ogbonda GitHub avatar
GITHUB User

Chiziaruhoma Ogbonda ↗

Systems & Harness Engineer

语言KotlinDartSwiftRubyObjective-C

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 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.