initialize method
Future<void>
initialize({
- required String sdkKey,
- required String sdkName,
- required String sdkVersion,
- HackleConfig? hackleConfig,
- HackleUser? user,
override
Implementation
@override
Future<void> initialize({
required String sdkKey,
required String sdkName,
required String sdkVersion,
HackleConfig? hackleConfig,
HackleUser? user,
}) async {
try {
final Map<String, Object?> arguments = {
Argument.sdkKey.value: sdkKey,
Argument.hackleConfig.value: hackleConfig?.toMap(),
Argument.wrapperName.value: sdkName,
Argument.wrapperVersion.value: sdkVersion,
Argument.user.value: user?.toMap(),
};
return methodChannel.invokeMethod(Method.initialize.value, arguments);
} catch (e) {
log("Failed to initialize", level: 3, error: e);
}
}