clearConversationOnNotification static method

Future<void> clearConversationOnNotification(
  1. String jid
)

Implementation

static Future<void> clearConversationOnNotification(String jid) async {
  var id = jid.hashCode;
  var barNotifications =
      await flutterLocalNotificationsPlugin.getActiveNotifications();
  for (var notification in barNotifications) {
    if (notification.id == id) {
      flutterLocalNotificationsPlugin.cancel(notification.id!);
    }
  }
}