Last updated:
0 purchases
screen protector
screen_protector #
Safe Data Leakage via Application Background Screenshot and Prevent Screenshot for Android and iOS.
Feature #
Import #
import 'package:screen_protector/screen_protector.dart';
copied to clipboard
iOS #
Protect Data Leakage Background Screenshot
Protect data leakage with image
await ScreenProtector.protectDataLeakageWithImage('LaunchImage');
copied to clipboard
Protect data leakage with color ON
await ScreenProtector.protectDataLeakageWithColor(Colors.white);
copied to clipboard
Protect data leakage with color OFF
await ScreenProtector.protectDataLeakageWithColorOff();
copied to clipboard
Protect data leakage with blur ON
await ScreenProtector.protectDataLeakageWithBlur();
copied to clipboard
Protect data leakage with blur OFF
await ScreenProtector.protectDataLeakageWithBlurOff();
copied to clipboard
Prevent Screenshot
ON
await ScreenProtector.preventScreenshotOn();
copied to clipboard
OFF
await ScreenProtector.preventScreenshotOff();
copied to clipboard
Check Screen Recording
final isRecording = await ScreenProtector.isRecording();
copied to clipboard
Android #
Protect Data Leakage Background Screenshot and Prevent Screenshot
ON
await ScreenProtector.protectDataLeakageOn();
copied to clipboard
or
await ScreenProtector.preventScreenshotOn();
copied to clipboard
OFF
await ScreenProtector.protectDataLeakageOff();
copied to clipboard
or
await ScreenProtector.preventScreenshotOff();
copied to clipboard
Protect Data Leakage for Android 12+ (Optional)
https://github.com/prongbang/screen-protector
import com.prongbang.screenprotect.AndroidScreenProtector
class MainActivity : FlutterFragmentActivity() {
private val screenProtector by lazy { AndroidScreenProtector.newInstance(this) }
// For Android 12+
override fun onWindowFocusChanged(hasFocus: Boolean) {
super.onWindowFocusChanged(hasFocus)
screenProtector.process(hasFocus.not())
}
}
copied to clipboard
Usage #
Android #
Protect Data Leakage Background Screenshot and Prevent Screenshot.
import 'package:screen_protector/screen_protector.dart';
class _PreventScreenshotPageState extends State<MyApp> {
void _preventScreenshotOn() async => await ScreenProtector.protectDataLeakageOn();
void _protectDataLeakageOff() async => await ScreenProtector.protectDataLeakageOff();
@override
void initState() {
_preventScreenshotOn();
super.initState();
}
@override
void dispose() {
_protectDataLeakageOff();
super.dispose();
}
}
copied to clipboard
iOS #
Prevent Screenshot
import 'package:screen_protector/screen_protector.dart';
class _PreventScreenshotPageState extends State<MyApp> {
void _preventScreenshotOn() async => await ScreenProtector.preventScreenshotOn();
void _preventScreenshotOff() async => await ScreenProtector.preventScreenshotOff();
@override
void initState() {
_preventScreenshotOn();
super.initState();
}
@override
void dispose() {
_preventScreenshotOff();
super.dispose();
}
}
copied to clipboard
Protect data leakage with color
import 'package:screen_protector/screen_protector.dart';
class _ProtectDataLeakagePageState extends State<MyApp> {
void _protectDataLeakageWithColor() async => await ScreenProtector.protectDataLeakageWithColor(Colors.white);
@override
void initState() {
_protectDataLeakageWithColor();
super.initState();
}
}
copied to clipboard
Protect data leakage with image
import 'package:screen_protector/screen_protector.dart';
class _ProtectDataLeakagePageState extends State<MyApp> {
void _protectDataLeakageWithImage() async => await ScreenProtector.protectDataLeakageWithImage('LaunchImage');
@override
void initState() {
_protectDataLeakageWithImage();
super.initState();
}
}
copied to clipboard
Protect data leakage with blur
import 'package:screen_protector/screen_protector.dart';
class _ProtectDataLeakagePageState extends State<MyApp> {
void _protectDataLeakageWithBlur() async => await ScreenProtector.protectDataLeakageWithBlur();
@override
void initState() {
_protectDataLeakageWithBlur();
super.initState();
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.