onClose property

WebNotificationCloseHandler? get onClose

Event fired when the notification is closed by the web code, such as through notification.close().

You don't need to call reportClosed since this is coming from the web code.

Officially Supported Platforms/Implementations:

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

Implementation

WebNotificationCloseHandler? get onClose => platform.onClose;
set onClose (WebNotificationCloseHandler? handler)

Implementation

void set onClose(WebNotificationCloseHandler? handler) {
  platform.onClose = handler;
}