Skip to content
pubscout

flutter_screenshot_detect

0.1.7, released 2 years ago by an unverified publisher

Detects screenshots on Android and iOS devices in real-time.

WASM-ready
$ flutter pub add flutter_screenshot_detect
Source repository

What it does

Detects when a user takes a screenshot on Android and iOS devices. It offers real-time event listening through an EventChannel, supporting both modern Android screen capture callbacks and legacy content observers.

AI-written summary of version 0.1.7, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to know when a user takes a screenshot of your app.
  • You want to handle screenshot events on both Android and iOS.

Skip it when

  • You need to programmatically prevent screenshots rather than just detect them.

Strengths

  • Supports both Android and iOS.
  • Provides real-time event listening using streams.
  • Handles modern Android 14+ screen capture callbacks and older content observers.

Weaknesses

  • Requires platform-specific permissions (like READ_EXTERNAL_STORAGE) for older Android versions.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

Add READ_EXTERNAL_STORAGE permission in AndroidManifest.xml for Android versions below 14 if targeting older devices.

final FlutterScreenshotDetect _detector = FlutterScreenshotDetect();

@override
void initState() {
  super.initState();
  _detector.startListening((event) {
    print('Screenshot Taken');
  });
}

@override
void dispose() {
  _detector.stopListening();
  super.dispose();
}

Alternatives

Packages that do the same job and could replace flutter_screenshot_detect.

Works with

Packages commonly used together with flutter_screenshot_detect: ones it builds on, ones built on it, and its own family.