reportClosed method
The host may run this to report the notification was dismissed, and it will cause the close event to be raised for non-persistent notifications and the notificationclose event for persistent notifications.
You must not run this unless you are handling the onNotificationReceived event.
Returns HRESULT_FROM_WIN32(ERROR_INVALID_STATE) if handled is false or reportShown has not been run when this is called.
Officially Supported Platforms/Implementations:
- Windows WebView2 (Official API - ICoreWebView2Notification.ReportClosed)
Use the PlatformWebNotificationController.isMethodSupported method to check if this method is supported at runtime.
Implementation
Future<void> reportClosed() => platform.reportClosed();