Flutter FCM onMessage are executed in Android, but they are not executed in iOS

When a notification is received, onBackgroundMessage and onMessage are executed in Android, but they are not executed in iOS. While I can ensure that heads-up notifications are always displayed in the foreground using the setForegroundNotificationPresentationOptions method, I want to show heads-up notifications conditionally through onMessage. How can I achieve this?

related issue: