Skip to content
pubscout

screenshot_callback

3.0.1, released 3 years ago by an unverified publisher

Detect mobile screenshots and execute callback functions on iOS and Android.

WASM-ready
$ flutter pub add screenshot_callback
Source repository

What it does

Allows Flutter applications to listen for mobile screenshot events on both iOS and Android platforms. When a screenshot is detected, a provided callback function is executed.

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

Use it when

  • You need to trigger analytics or logs when users take screenshots.
  • You want to warn users or take action within the app upon screenshot detection.

Skip it when

  • You need complex image editing or screen recording features.
  • Target platforms do not include Android or iOS.

Strengths

  • Simple API to set up screenshot listeners.
  • Supports both iOS and Android.

Weaknesses

  • Requires manual permission handling on Android.
  • Limited to detecting screenshots only.

Setup

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

Requires permission handling on Android to access external storage for screenshot detection.

ScreenshotCallback screenshotCallback = ScreenshotCallback();

screenshotCallback.addListener(() {
  print('detect screenshot');
});

screenshotCallback.dispose();

Alternatives

Packages that do the same job and could replace screenshot_callback.