1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Add Action to AndroidNotificationDetails

Discussão em 'Mobile' iniciado por Stack, Outubro 3, 2024 às 16:52.

  1. Stack

    Stack Membro Participativo

    I would like to add a button to my notification, I was able to get it displayed but I can't find the documentation on how to add an action to the button press

    const androidNotification = AndroidNotificationDetails(
    'Bla', 'Bla',
    icon: 'ic_bg_service_small',
    ongoing: true,
    actions: [AndroidNotificationAction("stop", "Stop")]);

    flutterLocalNotificationsPlugin.show(
    888,
    'MyService',
    'bla',
    const NotificationDetails(android: androidNotification),
    );

    Continue reading...

Compartilhe esta Página