onPushNotificationClicked method

  1. @override
Future<String?> onPushNotificationClicked(
  1. String campaignId
)
override

Logs push notification clicked event

Implementation

@override
Future<String?> onPushNotificationClicked(String campaignId) async {
  _ensureInitialized();
  try {
    final String? result = await methodChannel.invokeMethod(
        'onPushNotificationClicked', {'campaignId': campaignId});
    log("Push notification clicked event logged successfully with result: $result");
    return result;
  } on PlatformException catch (e) {
    log("Failed to log push notification clicked event: ${e.message}");
    return 'Failed to log push notification clicked event: ${e.message}';
  }
}