getReportRaw method

  1. @override
Future<Map<String, Object?>> getReportRaw()
override

Collects device trust signals as a raw map.

Platform implementations should return a map with keys:

  • rootedOrJailbroken (bool)
  • emulator (bool)
  • devModeEnabled (bool)
  • adbEnabled (bool)
  • fridaSuspected (bool)
  • debuggerAttached (bool)
  • details (Map<String, dynamic>)

Implementation

@override
Future<Map<String, Object?>> getReportRaw() async {
  final Map<Object?, Object?>? result = await _channel
      .invokeMethod<Map<Object?, Object?>>('getDeviceTrustReport');

  if (result == null) {
    throw PlatformException(
        code: 'NULL_RESULT', message: 'device_trust returned null');
  }

  // Normalize keys to String
  return result.map((key, value) => MapEntry(key.toString(), value));
}