WebNotificationController class

Class representing a web notification controller.

This class provides methods to report the notification has been displayed, clicked, or closed as required by the ICoreWebView2Notification interface.

Constructors

WebNotificationController({required String id, required WebNotification notification})
Class representing a web notification controller.
WebNotificationController.fromPlatform({required PlatformWebNotificationController platform})
Constructs a WebNotificationController from a specific platform implementation.
WebNotificationController.fromPlatformCreationParams({required PlatformWebNotificationControllerCreationParams params})
Constructs a WebNotificationController.

Properties

hashCode → int
The hash code for this object.
no setterinherited
id → String
Web notification ID.
no setter
notification → WebNotification
The notification data.
no setter
onClose ↔ WebNotificationCloseHandler?
Event fired when the notification is closed by the web code, such as through notification.close().
getter/setter pair
platform → PlatformWebNotificationController
Implementation of PlatformWebNotificationController for the current platform.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes the web notification controller.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reportClicked() → Future<void>
The host may run this to report the notification has been clicked, and it will cause the click event to be raised for non-persistent notifications and the notificationclick event for persistent notifications.
reportClosed() → Future<void>
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.
reportShown() → Future<void>
The host may run this to report the notification has been displayed and it will cause the show event to be raised for non-persistent notifications.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

isClassSupported({TargetPlatform? platform}) → bool
Check if the current class is supported by the defaultTargetPlatform or a specific platform.
isMethodSupported(PlatformWebNotificationControllerMethod method, {TargetPlatform? platform}) → bool
Check if the given method is supported by the defaultTargetPlatform or a specific platform.
isPropertySupported(dynamic property, {TargetPlatform? platform}) → bool
Check if the given property is supported by the defaultTargetPlatform or a specific platform. The property should be one of the PlatformWebNotificationControllerProperty or PlatformWebNotificationControllerCreationParamsProperty values.