subscribeToTopic method

  1. @override
Future<void> subscribeToTopic(
  1. String topic
)

Subscribe to topic in background.

topic must match the following regular expression: [a-zA-Z0-9-_.~%]{1,900}.

Implementation

@override
Future<void> subscribeToTopic(String topic) {
  throw UnimplementedError('''
    subscribeToTopic() is not supported on the web clients.

    To learn how to manage subscriptions for web users, visit the
    official Firebase documentation:

    https://firebase.google.com/docs/cloud-messaging/js/topic-messaging
  ''');
}