no_screenshot
2.0.1, released 3 months ago by flutterplaza.com
Disable screenshots and screen recording, detect events, and show overlays in the app switcher.
What it does
Prevents screenshots and screen recording across multiple platforms, listens for screenshot events via streams, and displays custom overlays (blur, color, or image) in the app switcher. It also offers declarative secure widgets and per-route protection policies.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to protect sensitive user data from being captured via screenshots or screen recordings.
- You want to display blur, color, or image overlays when the app enters the app switcher.
- You need to detect when a user takes a screenshot or records the screen.
Skip it when
- You are building for Linux or Web where OS-level screenshot blocking is not supported by the platform.
- You need detailed screenshot file paths on Android or iOS (which are not exposed by those operating systems).
Strengths
- Cross-platform support covering Android, iOS, macOS, Linux, Windows, and Web.
- Provides both imperative methods and stream-based screenshot/recording detection.
- Supports app-switcher overlay modes like blur, color, and images.
Weaknesses
- Platform limitations on Linux and Web prevent actual blocking of screenshots or screen recordings.
- Screenshot file paths are only available on macOS and Linux due to platform restrictions.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Supports Swift Package Manager and CocoaPods on iOS and macOS with no extra manual configuration required for standard usage.
import 'package:no_screenshot/no_screenshot.dart';
final noScreenshot = NoScreenshot.instance;
// Disable screenshots & screen recording
await noScreenshot.screenshotOff();
// Re-enable screenshots & screen recording
await noScreenshot.screenshotOn();Alternatives
Packages that do the same job and could replace no_screenshot.
- ios_insecure_screen_detector
Detect screenshots and screen recording on iOS devices.
47Compare - screen_capture_event
Catch screenshots and screen recordings on Android and iOS.
87Compare - wakelock_plus
Keep the device screen awake across mobile, desktop, and web platforms.
92Compare - flutter_overlay_window
Flutter plugin to display your app over other apps on the screen.
85Compare
Works with
Packages commonly used together with no_screenshot: ones it builds on, ones built on it, and its own family.