title: Flutter: Foreground notification is not working in firebase messaging
body: <p>I need to show firebase notifications when the app is on foreground by using local notification but it is not working.</p>
  
  <pre><code>  FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin=new FlutterLocalNotificationsPlugin();
  
    static  FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
    static StreamController&lt;Map&lt;String, dynamic&gt;&gt; _onMessageStreamController =
    StreamController.broadcast();
    static StreamController&lt;Map&lt;String, dynamic&gt;&gt; _streamController =
    StreamController.broadcast();
    static final Stream&lt;Map&lt;String, dynamic&gt;&gt; onFcmMessage =
        _streamController.stream;
  
    @override
    void initState() {
      super.initState();
  
      var android=AndroidInitializationSettings('mipmap/ic_launcher.png');
      var ios=IOSInitializationSettings();
      var platform=new  InitializationSettings(android,ios);
      flutterLocalNotificationsPlugin.initialize(platform);
  
      firebaseCloudMessaging_Listeners();
    }
  </code></pre>
  
  <p>Here is the Firebase Code</p>
  
  <pre><code> void firebaseCloudMessaging_Listeners() {
  
  if (Platform.isIOS) iOS_Permission();
  
  _firebaseMessaging.getToken().then((token) {
    print("FCM TOKEN--" + token);
  });
  _firebaseMessaging.configure(
    onMessage: (Map&lt;String, dynamic&gt; message) async {
      print('on message $message');
      showNotification(message);
    },
    onResume: (Map&lt;String, dynamic&gt; message) async {
      print('on resume $message');
    },
    onLaunch: (Map&lt;String, dynamic&gt; message) async {
      print('on launch $message');
    },
  );
  
  
  }
  </code></pre>
  
  <p>This is <code>showNotification</code> method</p>
  
  <pre><code> void showNotification(Map&lt;String, dynamic&gt; msg) async{
      print(msg);
      var android = new AndroidNotificationDetails(
          'my_package', 'my_organization', 'notification_channel', importance: Importance.Max, priority: Priority.High);
      var iOS = new IOSNotificationDetails();
      var platform=new NotificationDetails(android, iOS);
      await flutterLocalNotificationsPlugin.show(
        0,'My title', 'This is my custom Notification', platform,);
    }
  </code></pre>
  
  <p>and Firebase Response </p>
  
  <blockquote>
    <p>{notification: {title: Test Title, body: Test Notification Text}, data: {orderid: 2, click_action: FLUTTER_NOTIFICATION_CLICK, order name: farhana}}</p>
  </blockquote>