check method

  1. @override
Future<SafetyNetCheckResult> check()
override

Runs the security check on this platform and returns the result. Never disables features or reacts on its own — see SafetyNetCheckResult's doc comment.

Implementation

@override
Future<SafetyNetCheckResult> check() async {
  final result = await methodChannel.invokeMapMethod<Object?, Object?>(
    'check',
  );
  if (result == null) {
    return const SafetyNetCheckResult(isCompromised: false, reasons: []);
  }
  return SafetyNetCheckResult.fromMap(result);
}