Flutter - How to implement notifications for a messaging app?

3,342

I know it's a little late but anyone who wants to know, you need to use Firebase trigger, you can follow the below article.

flutter-chat-app-extended-push-notification-messages

Share:
3,342
Ismaeil Ghouneim
Author by

Ismaeil Ghouneim

Updated on December 13, 2022

Comments

  • Ismaeil Ghouneim
    Ismaeil Ghouneim over 1 year

    I'm creating a messaging app on flutter and it's using cloud Firestore to receive and store messages. Everything is working fine but I want to add the notifications feature (when X sends a message to Y, Y gets a notification).

    I've researched this quite a lot and I didn't find any tutorials for it. All I find are tutorials for FCM that broadcasts notifications.

    The only concept I understand now(but I also don't know how to implement) is to implement a Firestore trigger when the database is updated to execute a cloud function (onUpdate) that sends a notification to the receiving end.

    And for that concept, I also didn't find any documentation for it in flutter or dart. I've used the cloud_functions package from pub.dev and the documentation is only for nodeJS.

    Any idea on how to implement this concept? and if it's wrong for a messaging app, I'd appreciate any other better solution.