screenshot_callback 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new68

Screenshot Callback

Flutter plugin that allows you to detect mobile screenshot and execute callback functions on iOS and Android. 🚀

UsageIssues and FeedbackAuthorLicense

Feedback welcome and Pull Requests are most welcome!

Usage #

Import the package #

To use this plugin, follow the plugin installation instructions.

Use the plugin #

Add the following import to your Dart code:

import 'package:screenshot_callback/screenshot_callback.dart';

Initialize ScreenshotCallback with the scopes you want:

ScreenshotCallback screenshotCallback = ScreenshotCallback();

addListener #

Then invoke addListener method of ScreenshotCallback. Add custom functions that you want to excute after detect screenshot. e.g:

screenshotCallback.addListener(() {
  //Void funtions are implemented
  print('detect screenshot');

dispose #

You need to call dispose method to terminate ScreenshotCallback before you exit the app e.g:


Issues and Feedback #

Please file issues to send feedback or report a bug. Thank you !

Author #

License #


1.0.1 #

  • import permission_handler package.

1.0.0 #

  • update to add Android integration guide. (READ_EXTERNAL_STORAGE permission)

0.1.0 #

  • fix serveral android phone's screenshot callback detect path.

0.0.2 #

  • update readme

0.0.1 #

  • update example > add permission plugin to access external storage in android

0.0.1-alpha0 #

enable to detect screenshot on iOS and Android! 😀


screenshot_callback_example #

Demonstrates how to use the screenshot_callback plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  screenshot_callback: ^1.0.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:screenshot_callback/screenshot_callback.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
permission_handler ^3.2.2 3.3.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies