toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'isRooted': isRooted,
'isJailbroken': isJailbroken,
'isEmulator': isEmulator,
'isDebuggerAttached': isDebuggerAttached,
'hasProxy': hasProxy,
'hasVPN': hasVPN,
'isScreenCaptureBlocked': isScreenCaptureBlocked,
'isSSLValid': isSSLValid,
'isBiometricAvailable': isBiometricAvailable,
'isCodeObfuscated': isCodeObfuscated,
'isDeveloperModeEnabled': isDeveloperModeEnabled,
'isUsbCableAttached': isUsbCableAttached, // New field
'riskScore': riskScore,
'isSecure': isSecure,
'activeThreats': activeThreats.map((e) => e.toJson()).toList(),
};
}