This is how I am creating a notification using Awesome Notifications in Flutter:
AwesomeNotifications().createNotification(
content: NotificationContent(
id: 1,
channelKey: 'basic_channel',
title: "You spent some money?",
body: "We think, ₹ ${jsonObject['amount']} that was ${jsonObject['type']} to ${jsonObject['vendor']} belongs to this category: ${jsonObject['category']}",
actionType: ActionType.Default),
actionButtons: [
NotificationActionButton(
key: 'Approve',
label: 'Approve',
),
NotificationActionButton(
key: 'Edit',
label: 'Edit',
)
],
);
I want to add different functionalities to Approve and Edit options. What is the exact syntax to do that?
This is a example of Downloading a PDF file and showing a notification to PDF Downloaded successfully and give option to open it. So, I've Passed Payload to Notification.
In your case You have to give a Channel Key and You have to create a function for your specific functionality and replace in place of
dir.path.