configureLocalNotifications static method

Future<void> configureLocalNotifications({
  1. String? notificationIcon,
})

Implementation

static Future<void> configureLocalNotifications(
    {String? notificationIcon}) async {
  await InngageConfigureLocalNotifications.configureLocalNotifications(
    onPayload: (payload) {
      try {
        final data = Map<String, dynamic>.from(json.decode(payload));
        openNotification(data);
        onNotificationClick(data);
      } catch (e) {
        debugPrint('Notification payload error: $e');
      }
    },
    notificationIcon: notificationIcon,
  );
}