setup method

  1. @override
Future<void> setup(
  1. String organizationId,
  2. String projectId,
  3. String publicKey, {
  4. Uri? configurationURL,
  5. String mode = 'strict',
  6. String? instanceId,
})
override

Initializes the TrustPin SDK with the given credentials via the method channel.

Sends setup to the native platform with the organization credentials, optional configurationURL, pinning mode, and optional instanceId.

Implementation

@override
Future<void> setup(
  String organizationId,
  String projectId,
  String publicKey, {
  Uri? configurationURL,
  String mode = 'strict',
  String? instanceId,
}) async {
  await methodChannel.invokeMethod('setup', {
    'organizationId': organizationId,
    'projectId': projectId,
    'publicKey': publicKey,
    'configurationURL': configurationURL?.toString(),
    'mode': mode,
    'instanceId': instanceId,
  });
}