hello guys i want to send notification to all users in my firebase by API like this :
`var serverToken ="" ;
sendNotify(String title , String body , String id) async{
await http.post(
Uri.parse('https://fcm.googleapis.com/fcm/send'),
headers:<String,String>{'Content-Type':'application/json',
'Authorization':'key=$serverToken',},
body:jsonEncode(
<String,dynamic>{
'notification':<String,dynamic>{
'body':body.toString(),
'title':title.toString()
},
'priority':'high',
'data':<String,dynamic>{
'click_action':'FLUTTER_NOTIFICATION_CLICK',
'id':id.toString()},
//'to':'all', <<<<<<< here i want to send it to all users not by token }));`