hefty_kat
hefty_kat

Reputation: 211

How to add a user to a Topic for firebase push notifications

I am using push notifications and can successfully send to all devices but I want to create a page that allows users to subscribe to certain lists. Notifications will be triggered from a admin panel for the app.

I've read the documentation but I'm still new to all this so I am hoping someone might have some ideas on how to start.

Something like this: ( I am a well paid artist)

enter image description here

Upvotes: 0

Views: 131

Answers (1)

Arthur Thompson
Arthur Thompson

Reputation: 9225

You can use the subscribeToTopic and unsubscribeToTopic methods when a user selects or deselects one of the switches.

https://github.com/flutter/plugins/blob/master/packages/firebase_messaging/lib/firebase_messaging.dart#L89

Upvotes: 1

Related Questions