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

Un plugin de Flutter para bloquear capturas y grabaciones de pantalla en Android, iOS, Windows y macOS.

example/lib/main.dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:screen_capture_blocker_example/screen_capture_blocker.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Screen Capture Blocker')),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                onPressed: () async {
                  await ScreenCaptureBlocker.blockScreenCapture();
                  if (kDebugMode) {
                    print('Bloqueo de captura activado.');
                  }
                },
                child: const Text('Bloquear Capturas'),
              ),
              ElevatedButton(
                onPressed: () async {
                  await ScreenCaptureBlocker.allowScreenCapture();
                  if (kDebugMode) {
                    print('Bloqueo de captura desactivado.');
                  }
                },
                child: const Text('Permitir Capturas'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
4
likes
140
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

Un plugin de Flutter para bloquear capturas y grabaciones de pantalla en Android, iOS, Windows y macOS.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, web

More

Packages that depend on screen_capture_blocker