I can't control how the app opens the notification message with firebase

enter image description here

FirebaseMessaging.onMessageOpenedApp is not working

FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
  debugPrint("CLICKED!");
  RemoteNotification? notification = message.notification;
  AndroidNotification? android = message.notification?.android;

  debugPrint("id: ${notification?.body}");

  if (android != null && notification != null) {
    Navigator.push(
      context,
      MaterialPageRoute(builder: (context) => const NotificationScreen()),
    );
  }
});
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum