initialize method

  1. @override
Future<void> initialize({
  1. String? apiKey,
})
override

Initializes the SDK.

apiKey is optional. If not provided, the plugin searches for ZarliAPIKey in the Info.plist (iOS) or AndroidManifest.xml (Android).

Implementation

@override
Future<void> initialize({String? apiKey}) async {
  final Map<String, dynamic> args = {};
  if (apiKey != null) {
    args['apiKey'] = apiKey;
  }
  await methodChannel.invokeMethod<void>('initialize', args);
}