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
- Gwangyu-Kim • kwangyu326@gmail.com
- minsub0922 • minsub0922@naver.com
- beygee • doug0476@naver.com
- Flutter Moum • fluttermoum@gmail.com
License
MIT
Libraries
Dart
- dart:ffi
- Foreign Function Interface for interoperability with the C programming language. [...]
- dart:html
- HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
- dart:js
- Low-level support for interoperating with JavaScript. [...]
- dart:js_util
- Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.