reportClosed method

  1. @SupportedPlatforms.new(platforms: [WindowsPlatform(apiName: 'ICoreWebView2Notification.ReportClosed', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2notification?view=webview2-1.0.3595.46#reportclosed')])
Future<void> reportClosed()

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:

Use the PlatformWebNotificationController.isMethodSupported method to check if this method is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    WindowsPlatform(
      apiName: 'ICoreWebView2Notification.ReportClosed',
      apiUrl:
          'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2notification?view=webview2-1.0.3595.46#reportclosed',
    ),
  ],
)
Future<void> reportClosed() {
  throw UnimplementedError(
    'reportClosed is not implemented on the current platform',
  );
}