zo_screenshot 0.0.2 copy "zo_screenshot: ^0.0.2" to clipboard
zo_screenshot: ^0.0.2 copied to clipboard

zo_screenshot is a Flutter plugin that allows you to enable, disable, toggle, or stream screenshot events in your application.

zo_screenshot #

pub package pub points License: MIT

The zo_screenshot plugin helps restrict screenshots and screen recording in Flutter apps, enhancing security and privacy by preventing unauthorized screen captures.

Getting started #

First, add zo_screenshot as a dependency in your pubspec.yaml file

dependencies:
  flutter:
    sdk: flutter
  zo_screenshot : ^[version]

Import the package #

import 'package:zo_screenshot/zo_screenshot.dart';

Usage #

Wrap with ZoScreenShotWrapper #

ZoScreenShotWrapper(
  disableScreenShot: true,
  backgroundPreviewWidget: Container(
    decoration: BoxDecoration(
      gradient: LinearGradient(
        begin: Alignment.topCenter,
        end: Alignment.bottomCenter,
        colors:[Colors.grey[300]!, Colors.grey],
      ),
    ),
    width: double.infinity,
    height: double.infinity,
    child: Center(
    child: Icon(Icons.lock, size: 50, color: Colors.white),
    ),
  ),
  child: Scaffold(
    appBar: AppBar(
      title: const Text('Plugin example app'),
    ),
    body: Example(),
  ),
);



Properties Description
backgroundPreviewWidget Add Your own custom preview widget
disableScreenShot set to true to disable screenshot
showBackgroundPreview set to false to disable background preview

Disabling ScreenShot #

final _zoScreenshotPlugin = ZoScreenshot();
_zoScreenshotPlugin.disableScreenShot();

Enabling Screenshot

final _zoScreenshotPlugin = ZoScreenshot();
_zoScreenshotPlugin.enableScreenshot();

Listen To Screenshot Event

final _zoScreenshotPlugin = ZoScreenshot();

_zoScreenshotPlugin.startScreenshotListner(
  screenShotcallback: () {
    print("Screenshot taken");
  },
);

Feel free to post a feature requests or report a bug here.

My Other packages #

  • zo_animated_border: A package that provides a modern way to create gradient borders with animation in Flutter
  • connectivity_watcher: A Flutter package to monitor internet connectivity with subsecond response times, even on mobile networks.
  • ultimate_extension: Enhances Dart collections and objects with utilities for advanced data manipulation and simpler coding.
  • theme_manager_plus: Allows customization of your app's theme with your own theme class, eliminating the need for traditional
  • date_util_plus: A powerful Dart API designed to augment and simplify date and time handling in your Dart projects.
  • pick_color: A Flutter package that allows you to extract colors and hex codes from images with a simple touch.
1
likes
150
points
94
downloads

Publisher

verified publisherthezerone.com

Weekly Downloads

zo_screenshot is a Flutter plugin that allows you to enable, disable, toggle, or stream screenshot events in your application.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on zo_screenshot