title: How to show flutter local notification while receiving push notification on foreground?
body: <p>Currently, I am using alert dialog to show the notification while receiving push notification while the app is in foreground. But I want to show something non-intrusive like local notification in flutter. How do I implement that in my application? Here is my current implementation:</p>
  
  <pre><code>FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
    @override
    void initState() {
      _firebaseMessaging.configure(
        onMessage: (Map&lt;String, dynamic&gt; message) async {
          showDialog(
            context: context,
            builder: (context) =&gt; AlertDialog(
              content: ListTile(
                title: Text(message['notification']['title']),
                subtitle: Text(message['notification']['body']),
              ),
              actions: &lt;Widget&gt;[
                FlatButton(
                  child: Text('Ok'),
                  onPressed: () =&gt; Navigator.of(context).pop(),
                ),
              ],
            ),
          );
          print("onMessage: $message");
        },
        onLaunch: (Map&lt;String, dynamic&gt; message) async {
          print("onLaunch: $message");
          Navigator.pushNamed(context, '/notify');
        },
        onResume: (Map&lt;String, dynamic&gt; message) async {
          print("onResume: $message");
        },
      );
  }
  </code></pre>