initFpjs static method

Future<void> initFpjs(
  1. String apiKey, {
  2. String? endpoint,
  3. String? scriptUrlPattern,
  4. Region? region,
  5. bool extendedResponseFormat = false,
})

Initializes the native FingerprintJS Pro client Throws a PlatformException if apiKey is missing

Implementation

static Future<void> initFpjs(String apiKey,
    {String? endpoint,
    String? scriptUrlPattern,
    Region? region,
    bool extendedResponseFormat = false}) async {
  await _channel.invokeMethod('init', {
    'apiToken': apiKey,
    'endpoint': endpoint,
    'scriptUrlPattern': scriptUrlPattern,
    'region': region?.stringValue,
    'extendedResponseFormat': extendedResponseFormat,
    'pluginVersion': pluginVersion,
  });
  _isExtendedResult = extendedResponseFormat;
  _isInitialized = true;
}