如何在不使用 firestore 的情况下使用 FCM 将通知推送到用户设备

How to use FCM to push notification to user device without using firestore

如何在不使用 Firebase 作为后端

的情况下使用 FCM 将通知推送到设备

fcm 它是一个独立的包,你可以在没有 firebase 的情况下使用 fcm

您可以使用这个包(按照自述文件步骤)

https://pub.dev/packages/firebase_messaging

和本教程

https://medium.com/@jun.chenying/flutter-tutorial-part3-push-notification-with-firebase-cloud-messaging-fcm-2fbdd84d3a5e

您应该将 fcm 令牌保存在您的数据库中,以便按设备发送通知或在没有 fcm 令牌的情况下发送群发通知