screen_capture_restrictions 1.0.0 copy "screen_capture_restrictions: ^1.0.0" to clipboard
screen_capture_restrictions: ^1.0.0 copied to clipboard

A flutter plugins to restrictions to screen capture on mobile platforms.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:screen_capture_restrictions/screen_capture_restrictions.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();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flutter Screen Capture Restrictions Sample.'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              InkWell(
                child: const Text('Enable Secure'),
                onTap: () async {
                  await ScreenCaptureRestrictions.enableSecure();
                },
              ),
              const SizedBox(height: 50),
              InkWell(
                child: const Text('Disable Secure'),
                onTap: () async {
                  await ScreenCaptureRestrictions.disableSecure();
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
14
likes
0
points
1.44k
downloads

Publisher

verified publishercam-inc.dev

Weekly Downloads

A flutter plugins to restrictions to screen capture on mobile platforms.

License

unknown (license)

Dependencies

flutter

More

Packages that depend on screen_capture_restrictions