heeyunlee / flutter_screenshot_callback

Flutter plugin that allows you to detect mobile screenshot and execute callback functions on iOS and Android. πŸš€

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Screenshot Callback

Flutter plugin that allows you to detect mobile screenshot and execute callback functions on iOS and Android. πŸš€

Usage β€’ Issues and Feedback β€’ Author β€’ License

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:

screenshotCallback.dispose();

Issues and Feedback

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

Author

License

MIT

About

Flutter plugin that allows you to detect mobile screenshot and execute callback functions on iOS and Android. πŸš€

License:MIT License


Languages

Language:Dart 23.8%Language:Kotlin 22.6%Language:Ruby 18.5%Language:Java 18.2%Language:Swift 14.3%Language:Objective-C 2.6%