init method
Implementation
@override
Future<void> init(JawalConfig config) async {
try {
final configMap = <String, dynamic>{
'sdkKey': config.apiKey,
'userId': config.userId,
'userDescription': config.userDescription
};
await methodChannel.invokeMethod<bool>("init", configMap);
methodChannel.setMethodCallHandler((call) async {
handlePlatformCalls(call, config);
});
} catch (e) {
config.onInitResult!(
InitResultEvent(isSuccessful: false, error: e.toString()));
}
}