onMessage method

Future<void> onMessage(
  1. RemoteMessage message
)

This method will be called on tap of the notification which came when app was in foreground

Firebase messaging does not push notification in notification panel when app is in foreground. To send the notification when app is in foreground we will use flutter_local_notification to send notification which will behave similar to firebase notification

Implementation

Future<void> onMessage(RemoteMessage message) async {
  logCat('IN onMessage');
  senderNotificationLocalService.showNotification(message: message);//, data:true);
}