How to make FCM notification non-removable in flutter?

155 views Asked by At

I want to make FCM notification that send to my flutter app non-removable ( the user can not clear it when click on clear button or slide the notification to the left). I search for it but no answer about how to handle it with flutter and FCM notification.

1

There are 1 answers

0
Ahmed Elbadawy On

To make notification non-removable ... just make ongoing: true in flutter_local_notifications package

AndroidNotificationDetails androidDetails = new AndroidNotificationDetails("channelId",
    notificationModel.title, notificationModel.body,
    ongoing: true);