title: Flutter push notification does not work when the app is not in the background?
body: <p>the Firebase push notifications works perfectly when the app is running or if it's exists in the background but it doesn't work when i am in the app or if the app is terminated from the background, please help!</p>
  <p>Here is the notification code:</p>
  <pre><code>var myToken;
    final fbm =FirebaseMessaging();
    Future&lt;void&gt; showFirebaseNotification() async{
      final fbm = FirebaseMessaging();
      fbm.requestNotificationPermissions();
      fbm.configure(
         onMessage: (msg){
          print(msg);
          return;
        },
        onLaunch: (msg){
          print(msg);
          return;
        },
        onResume: (msg){
          print(msg);
          return;
        }
      );
    }
    @override
    void initState(){
      showFirebaseNotification();
      fbm.getToken().then((String token) {
        assert(token != null);
        setState(() {
          myToken = token;
        });
        print(myToken);
      });
      super.initState();
    }
  </code></pre>
  <p>Here is what it returns in emulator you can find it in the picture below:</p>
  <p><a href="https://i.stack.imgur.com/dLrQj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dLrQj.png" alt="enter image description here" /></a></p>