subscribeToTopic static method

dynamic subscribeToTopic(
  1. String topic
)

To subscribe to a topic, call subscribeToTopic() with the topic name. This method returns a Future, which resolves when the subscription succeeded:

Implementation

static subscribeToTopic(String topic) {
  FirebaseMessaging.instance.subscribeToTopic(topic);
}