skip to Main Content

I want make notification like ADM notification to be always pinned on the notifications on phone and user only can ignore notification just with the button on the notification
How I can do that

something like this

I create the notification but I want pinned that

2

Answers


  1. Chosen as BEST ANSWER

    only work i must do that just set the ongoing condition in NotificationDetails to true :)

     notificationDetails() {
    return const NotificationDetails(
        android: AndroidNotificationDetails('channelId', 'channelName',
            autoCancel: false,
            importance: Importance.max,
        ongoing: true,
          enableVibration: false),
        iOS: DarwinNotificationDetails());
      }

    and next create a dart file form example notification services and


  2. You can achieve it through flutter_local_notification plugin.

    In that plugin, onGoing Notification facility is present so we can use it and enjoy ongoing notification

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search