I am using onesignal with flutter, and I implemented onesignal notification service. Now I want to handle notification action buttons without opening the app, so I added these lines inside notificationService didReceive function.
let notificationOpenedBlock: OSHandleNotificationActionBlock = { result in
if let actionID = result?.action.actionID {
print("actionID =", actionID)
}
}
but I am getting this error.
Cannot find type 'OSHandleNotificationActionBlock' in scope
I am not sure what I'm doing wrong, am I not supposed to use this code in this class? Or did I miss importing a package or something like this?