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,
);