screen_capture_restrictions
A flutter plugins to restrictions to screen capture on mobile platforms.
Installation
Add screen_capture_restrictions
as a dependency in your pubspec.yaml file.
Usage
From your Dart code, you need to import the plugin and use it's static methods.
If you want to restrict screen captures, run enableSecure. To remove the restriction, execute disableSecure.
// restrict screen captures
await ScreenCaptureRestrictions.enableSecure();
// remove restriction
await ScreenCaptureRestrictions.disableSecure();