app_screen_privacy 0.0.1 copy "app_screen_privacy: ^0.0.1" to clipboard
app_screen_privacy: ^0.0.1 copied to clipboard

Privacy screen plugin for Flutter apps to prevent screenshots and screen recordings.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:app_screen_privacy/app_screen_privacy.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    AppScreenPrivacy.init(
      logo: 'assets/images/privacy-lock.png',
      backgroundColor: '#FFFFFF',
      shouldPreventScreenShot: true,
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Privacy Screen Demo',
      home: Scaffold(
        appBar: AppBar(title: const Text('Plugin example app')),
        body: Center(child: Text('Test for screen overlay with custom logo\n')),
      ),
    );
  }
}
2
likes
160
points
18
downloads

Publisher

unverified uploader

Weekly Downloads

Privacy screen plugin for Flutter apps to prevent screenshots and screen recordings.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on app_screen_privacy

Packages that implement app_screen_privacy