flutter_device_protection 1.0.1
flutter_device_protection: ^1.0.1 copied to clipboard
One scan() call blocks screenshots, screen recording and app-switcher previews, and reports root, jailbreak, emulator, debugger, hooking frameworks and VPN.
1.0.1 #
- Shortened the package description to 180 characters, the pub.flutter-io.cn limit. The 1.0.0 description was 198, which cost the package its pubspec points.
Note for anyone reading the pub.flutter-io.cn score: the homepage, repository and issue tracker links are reported as unreachable while the GitHub repository is private. Making it public restores those points; no code change is involved.
1.0.0 #
First usable release.
Added
FlutterDeviceProtection.scan()as the single entry point. It applies the requested protections and returns a fullSecurityReport.- Protection flags on
scan():blockScreenshots,blockScreenRecordingandblockBackgroundSnapshot. An unset flag leaves that protection untouched, so a barescan()has no side effects. - Full iOS detection, matching the Android checks: jailbreak, Simulator, debugger, hooking frameworks and VPN. Reported through the same keys, scored by the same weights and thresholds.
supportedonSecurityCheckResult. Checks a platform cannot answer stay in the report rather than going missing, and never affect the risk score.developerModeandusbDebuggingare unsupported on iOS.- Report helpers for logging and backend submission:
checks,threats,hasThreats,isAtLeast,toMapandtoSummary. applyProtectionon the method channel, so both platforms answer one contract and Dart needs no platform branching.
Changed
- iOS scanning runs off the platform thread. It touches the filesystem and opens a loopback socket, so it no longer blocks the UI.
- iOS logging is debug-only. A release build is silent.
SecurityReport.fromMaptolerates a malformed or partial payload instead of throwing, so a native change cannot crash the app.
Removed
- The iOS security event channel, the screenshot notification detector and the
isIOSScreenCaptured/isIOSScreenshotDetectedmethods. None had a Dart caller. Capture observation now lives insideScreenProtectionManager, which starts it when protection is switched on and stops it when it is switched off.