sendPushNotificationToUsers method

Future sendPushNotificationToUsers({
  1. List<String>? users,
  2. String? subscription,
  3. String? title,
  4. String? body,
  5. Map<String, dynamic>? data,
  6. String? imageUrl,
})

Implementation

Future<dynamic> sendPushNotificationToUsers(
    {List<String>? users,
    String? subscription,
    String? title,
    String? body,
    Map<String, dynamic>? data,
    String? imageUrl}) {
  Map<String, dynamic> req = {
    'route': 'notification.sendMessageToUsers',
    'users': users,
    if (subscription != null) 'subscription': subscription,
    'title': title,
    'body': body,
    if (data != null) 'data': data,
    'imageUrl': imageUrl,
  };
  return request(req);
}