sendToCondition method
Convenience method to send a message to devices matching a condition.
Condition syntax: "'topic1' in topics && 'topic2' in topics".
await server.sendToCondition(
"'sports' in topics || 'news' in topics",
FirebaseMessage(notification: FirebaseNotification(title: 'Alert')),
);
Implementation
Future<ServerResult> sendToCondition(
String condition,
FirebaseMessage message,
) {
return _send(
FirebaseSend(
message: message.copyWith(
condition: condition,
token: null,
topic: null,
),
),
);
}