onNotificationReceived method
FutureOr<NotificationReceivedResponse?> ?
onNotificationReceived(
- NotificationReceivedRequest request
inherited
Event fired when a web notification is received.
The request contains the NotificationReceivedRequest.senderOrigin (the origin of the web content
that sends the notification) and the NotificationReceivedRequest.notificationController which provides
methods to report the notification status (shown, clicked, closed) back to the web content,
as well as listen for the close event when the notification is closed by web code.
Officially Supported Platforms/Implementations:
- Windows WebView2 (Official API - ICoreWebView2_24.add_NotificationReceived)
Parameters - Officially Supported Platforms/Implementations:
request: all platforms
Use the PlatformInAppBrowserEvents.isMethodSupported method to check if this method is supported at runtime.
Implementation
@override
FutureOr<NotificationReceivedResponse?>? onNotificationReceived(
NotificationReceivedRequest request,
) {
return null;
}