initialize method
Initializes the Play Integrity API with the given projectId
and optional nonce
.
Returns true
if initialization is successful, otherwise false
.
Implementation
@override
Future<bool> initialize(double projectId,
[String nonce = "borneo_security_default_nonce"]) async {
return methodChannel.invokeMethod("initialize", {
"project_id": projectId,
"nonce": base64Encode(nonce.codeUnits)
}).then((value) {
_initialized = value ?? false;
return _initialized;
});
}