gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
130 stars 85 forks source link

How to check for alarm stops when stopping from notification stop button? and onTap of Notification. #244

Open dhavalmnjtech opened 3 weeks ago

dhavalmnjtech commented 3 weeks ago

Alarm plugin version 4.0.0-dev.3

How i check for is my alarm is stopped from notification stop button. In my app to stop alarm i am using Alarm.stop(id); to stop the alarm so here after i called it i can do something in my code, but what about stopping alarm from notification button? here i have to call a function when i stop alarm from notification

as me, you can provide onStop method when stop from notification stop button. If there is method like this then everyone can perform some task on alarm stop from stop button of notification.

And also need onTap of notification If there is onTap for notification then user can perform task accordingly.

Additional context For my app i have to show non dismissible notification when user stops the alarm. This is possible when i use Alarm.stop(id); but need to do from notification stop button. I used flutter_local_notifications for non dismissible notification. And also want to open Alarm screen when tap on notification, so for it onTap is useful.

gdelataillade commented 2 weeks ago

Hi @dhavalmnjtech

Thanks for your interest in the package.

I'll consider adding a onStop callback when the alarm is stopped from the notification and a onTap when app is opened from the notification. I'll keep you updated here.

dhavalmnjtech commented 1 week ago

Hello @gdelataillade

Thank you for your reply.

That's great, if it will done. and it's can be very helpful for all.