init method
Future<void>
init({
- required String apiKey,
- required String matchingKey,
- required String? bucketingKey,
- SplitConfiguration? sdkConfiguration,
Implementation
@override
Future<void> init(
{required String apiKey,
required String matchingKey,
required String? bucketingKey,
SplitConfiguration? sdkConfiguration}) {
methodChannel.setMethodCallHandler((call) => handle(call));
Map<String, Object?> arguments = {
'apiKey': apiKey,
'matchingKey': matchingKey,
'sdkConfiguration': sdkConfiguration?.configurationMap ??
SplitConfiguration().configurationMap,
// If sdkConfiguration is null, create a new SplitConfiguration to apply default values
};
if (bucketingKey != null) {
arguments.addAll({'bucketingKey': bucketingKey});
}
return methodChannel.invokeMethod('init', arguments);
}