getVisitorId static method

Future<String?> getVisitorId({
  1. Map<String, dynamic>? tags,
  2. String? linkedId,
})

Returns the visitorId generated by the native Fingerprint Pro client Support tags Support linkedId Throws a FingerprintProError if identification request fails for any reason

Implementation

static Future<String?> getVisitorId(
    {Map<String, dynamic>? tags, String? linkedId}) async {
  if (!_isInitialized) {
    throw Exception(
        'You need to initialize the FPJS Client first by calling the "initFpjs" method');
  }

  try {
    final String? visitorId = await _channel
        .invokeMethod('getVisitorId', {'linkedId': linkedId, 'tags': tags});
    return visitorId;
  } on PlatformException catch (exception) {
    throw unwrapError(exception);
  }
}