79086656

Date: 2024-10-14 14:56:44
Score: 1.5
Natty:
Report link

Did you add these lines of code?

You need to configure a top level or static method which will handle the action:

@pragma('vm:entry-point')
void notificationTapBackground(NotificationResponse notificationResponse) {
  // handle action
}

Specify this function as a parameter in the initialize method of this plugin:

await flutterLocalNotificationsPlugin.initialize(
    initializationSettings,
    onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) async {
        // ...
    },
    onDidReceiveBackgroundNotificationResponse: notificationTapBackground,
);
Reasons:
  • Blacklisted phrase (1): this plugin
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Did you add these
  • Low reputation (0.5):
Posted by: Sukaina Ahmed