initialize method
Initializes the MoEngage notification handler.
Implementation
Future<void> initialize(MoEngageFlutter moengagePlugin) async {
if (_initialized) {
debugPrint('MoEngage notifications already initialized');
return;
}
try {
_moengagePlugin = moengagePlugin;
await _registerHandlers();
// await _setupPushToken();
_initialized = true;
} catch (e) {
debugPrint('Error initializing MoEngage notification handler: $e');
}
}