prepareIntegrityCheck static method
Android-only — prepares a Play Integrity token provider for
cloudProjectNumber (your Google Cloud project number, linked to your
Play Console app — see
https://developer.android.com/google/play/integrity/setup). Call once
(e.g. at app launch), well before you'll need a token; per Google's
guidance this has non-trivial latency (typically under 10s, budget up
to a minute).
Rejects with a PlatformException (code UNSUPPORTED_PLATFORM) on
iOS — Play Integrity has no iOS equivalent. Gate calls with
Platform.isAndroid if you don't want to handle that.
Implementation
static Future<void> prepareIntegrityCheck(int cloudProjectNumber) {
return SafetyNetFlutterPlatform.instance.prepareIntegrityCheck(
cloudProjectNumber,
);
}