addForegroundNotificationListener method
Registers a callback function for foreground notifications processed by Apphud The callback will have ApphudNotificationPayload data.
Make sure to add SwiftApphudPlusPlugin.handleForegroundNotifications
to
AppDelegate.swift (check README)
Implementation
Future<void> addForegroundNotificationListener(
ValueSetter<ApphudNotificationPayload> callback) async {
return ApphudPlusPlatform.instance
.addForegroundNotificationListenerRaw(callback);
}