screenshot_shield 0.1.1
screenshot_shield: ^0.1.1 copied to clipboard
Detect user screenshots and optionally prevent screen capture on Android and iOS.
0.1.1 #
- Fix iOS builds: correct the Swift Package library product name to
screenshot-shield. - Background blur on Android now only applies the
RenderEffectblur when the FlutterView usesRenderMode.texture(where it actually reaches Flutter content); otherwise a dim overlay is shown. UseRenderMode.textureinMainActivityfor a real blur. - Make the iOS background blur appear reliably in the app switcher by committing it immediately when the app enters the background.
ScreenshotShieldRouteGuardnow appliespreventCapture/detectScreenshotschanges immediately instead of only on route changes.- Add an example app demonstrating detection, captured-image callbacks, and background blur.
0.1.0 #
- Detect user screenshots on Android and iOS.
- Android 14+ uses the system
DETECT_SCREEN_CAPTUREAPI; older Android versions watch the media store for new screenshots. - iOS reports immediately via the
UIApplicationUserDidTakeScreenshotNotificationsystem notification. ScreenshotShieldScopeprovides a sharedScreenshotShieldto the widget tree.ScreenshotShieldRouteGuardscopes protection to a route: capture prevention and screenshot listening are enabled while the route is in view and released when another route covers it.- Optional re-rasterized PNG of the guarded screen passed to
onScreenshotDetected. - Optional native background blur that hides the app content in the app
switcher (
setProtection(backgroundBlur: true)). - Prevent screen capture on Android via the secure window flag
(
setProtection(preventCapture: true)).