initialize method
Implementation
@override
Future<void> initialize(String publicKey, String environment) async {
try {
await methodChannel.invokeMethod('initialize', {
'publicKey': publicKey,
'environment': environment,
});
} on PlatformException catch (e, stackTrace) {
_logger.severe('Error initializing the SDK: ${e.message}', e, stackTrace);
throw Exception('PlatformException: ${e.code}, ${e.message}');
} catch (e, stackTrace) {
_logger.severe('Unexpected error initializing the SDK', e, stackTrace);
throw Exception('Unexpected error: $e');
}
}