setOnShowNotificationInForeground abstract method
Whether notifications are shown when the app is in the foreground. By default, no notifications are shown when the app is in the foreground.
On messages with notifications trigger this method.
On iOS, the result will be passed to
userNotificationCenter:willPresentNotification
to decide how to show
the notification while the app is in the foreground.
On Android, notifications will not be shown in the foreground. To create notifications while the app is in the foreground, manually create one when a onMessage or BackgroundMessageHandler is called.
Implementation
void setOnShowNotificationInForeground(
Future<bool> Function(RemoteMessage message) callback);