subscribeToTopic static method

void 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 void subscribeToTopic(String topic) {
  FirebaseMessaging.instance.subscribeToTopic(topic);
}