ScreenshotDetector class

Constructors

ScreenshotDetector()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

currentScreen ScreenContext?
no setter
eventHistory List<SecurityEvent>
no setter
events Stream<SecurityEvent>
no setter
isRecordingActive bool
no setter
onRecordingStart Stream<SecurityEvent>
no setter
onRecordingStop Stream<SecurityEvent>
no setter
onScreenshot Stream<void>
no setter

Static Methods

addRule(SecurityEventRule rule) → void
attachDefaultAlerts(BuildContext context, {SecurityAlertConfig config = const SecurityAlertConfig()}) StreamSubscription<SecurityEvent>
clearEventHistory() → void
clearRules() → void
configure({bool includeDeviceInfo = false, bool ignoreNonSensitiveScreens = false, bool autoProtectSensitiveScreens = false, bool blurOnScreenshotDetected = false, bool enableScreenshotDetection = true, bool enableRecordingDetection = true, bool enableProtection = false, int maxLogEntries = 1000, SecurityEventDispatcher? dispatcher, SecurityEventCallback? onScreenshot, SecurityEventCallback? onRecordingStart, SecurityEventCallback? onRecordingStop}) Future<void>
Modular configuration requested by app developers.
dispose() → void
emitManualEvent({required SecurityEventType type, String? filePath, Map<String, dynamic>? raw}) Future<void>
exportLogsAsCsv() String
exportLogsAsJson() String
filterEventHistory({SecurityEventType? type, String? searchQuery, DateTime? from, DateTime? to, bool sensitiveOnly = false}) List<SecurityEvent>
getDeviceInfo() Future<Map<String, dynamic>?>
protectScreen({required bool enabled}) Future<void>
setCurrentScreen({required String name, String type = 'custom', bool isSensitive = false}) Future<void>
setScreenRecordingProtection({required ScreenProtectionMode mode}) Future<void>
setScreenshotProtectionEnabled({required bool enabled}) Future<void>
setUserId(String? userId) → void
shareableLogs({bool csv = false}) String
Returns a shareable content payload. Host app can pass this to share_plus.
shareLogsViaPlatform({bool csv = false}) Future<bool>
Optional native hook. Returns false on unsupported platforms.
showAlert(BuildContext context, SecurityEvent event, {SecurityAlertConfig config = const SecurityAlertConfig()}) Future<void>