Search packages, repositories and app categories

Package detailsv1.0.1

screen_capture_utils

A plugin to handle screen capture events on android and ios devices

AndroidiOS
30-day downloads
11
Likes
18
Pub points
150

Install package

flutter pub add screen_capture_utils

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter plugin that enables detection and handling of screen capture events on Android and iOS devices. It allows apps to respond when users take screenshots or record the screen, which is useful for protecting sensitive content. The plugin provides a simple API to listen for these events and trigger appropriate actions, such as displaying warnings or disabling certain features. It supports both major mobile platforms and integrates seamlessly into existing Flutter projects.

Use cases

  • Protecting sensitive UI content
  • Detecting unauthorized screenshots
  • Implementing DRM-like behavior
  • Enhancing app security
  • Monitoring screen recording activity

Key features

  • Cross-platform support (Android & iOS)
  • Event listener for screen capture
  • Simple integration with Flutter
  • Real-time detection of captures
  • Minimal setup required

Suitable for

  • Security-focused applications
  • Content protection apps
  • Apps with confidential data
  • Educational or enterprise software
  • Digital rights management implementations

Considerations

  • Limited to detecting capture events, not preventing them
  • Behavior may vary across device manufacturers
  • No control over system-level capture tools
  • Requires permission handling on Android
  • iOS limitations on background monitoring

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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.

Categories

Source repository

Projects using this package

No data available yet.