title: How can i send notification with firebase in app
body: <p>In my application, there are users who can send messages and only see incoming messages. Messages go according to the sections of the users. So far, no problem. When the message comes, it should also come in the notification. I have a service for this.</p>
  <pre><code>import ‘package:askon_notification/model/message.dart’;
  import ‘package:askon_notification/model/user.dart’;
  import ‘package:http/http.dart’ as http;
  
  class SendNotificationService{
  
     Future&lt;bool&gt; sendNotification(Messages sendMessage, MyUser sendingUser, String topic) async{
        var endURL = Uri.parse(‘https://fcm.googleapis.com/fcm/send’);
        String firebaseKey =“AAAA3**********************************”;
  
        Map&lt;String, String&gt; headers = {
        &quot;Content-Type&quot; : &quot;application/json&quot;,
        &quot;Authorization&quot; : &quot;key=$firebaseKey&quot;
        };
  
        String json = '{ &quot;to&quot; : &quot;topic/$topic&quot;, &quot;data&quot; : { &quot;message&quot; : &quot;test&quot;, &quot;title&quot; : &quot;baslik&quot; } 
        }';
  
        http.Response response = await http.post(endURL, headers:  headers, body: json);
  
        if(response.statusCode == 200){
           print(&quot;işlem başarılı&quot;);
           return true;
        }else{
           print(&quot;işlem başarısız&quot;);
           return false;
        }
     }
  }
  </code></pre>
  <p>Although I see the operation successful message, the application does not receive any notification. What method should I follow?</p>