skytect
skytect

Reputation: 387

Best way to trigger notification in flutter

My flutter app allows users to schedule events and needs to notify them when the time comes. These events involve multiple users and may be deleted. I am looking for the best way to trigger the notifications.

So far, I have found 2 packages that may be able to achieve this: firebase_messaging and flutter_local_notifications.

With firebase_messaging, I thought of creating a cloud function that would be triggered when an event was created in firestore, which schedules another cloud function to be run during the event, checking whether the event still exists in firestore, and triggering notifications accordingly. However, I am unsure of whether it is possible to schedule a cloud function from within another.

With flutter_local_notifications, my issue is that user B may create events involving user A or the event may be deleted whilst user A's app remains terminated. As such, the scheduled notifications for user A have no way of being adjusted accordingly.

What do you think is the best approach?

Upvotes: 1

Views: 2106

Answers (1)

רתם שורץ
רתם שורץ

Reputation: 89

If you need to involve multiple people , flutter local notifications isnt for you. It is not build for that.

Upvotes: 2

Related Questions