MethodChannelJsNotifications class
An implementation of JsNotificationsPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- JsNotificationsPlatform
- MethodChannelJsNotifications
- Implementers
Constructors
Properties
-
actionStream
→ Stream<
NotificationActionResult> -
Stream broadcasting notification click events with associated data & action
no setteroverride
-
dismissStream
→ Stream<
NotificationActionResult> -
Stream broadcasting notification close events with associated data
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasPermissions → bool
-
Convenience method checking browser notification support,
wrapper for Dart's native JS notification
Notification.permission
no setteroverride - isSupported → bool
-
Convenience method checking browser notification support,
wrapper for dart's native JS notification
Notification.supported
no setteroverride - methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scopeUrl ← String
-
no getteroverride
-
tapStream
→ Stream<
NotificationActionResult> -
Stream broadcasting notification tap events with associated data
no setteroverride
Methods
-
addNotification(
JSNotification notification) → Future< void> -
Send notification with interop.JSNotification to service worker
override
-
clearNotifications(
) → Future< void> -
Clear all notifications
override
-
dismissNotification(
{required String id}) → Future< void> -
Dismiss notification with ID
override
-
dispose(
) → Future< void> -
override
-
getAllNotifications(
) → Future< List< JSNotification> > -
Get all notifications
override
-
getNotification(
String tag) → Future< JSNotification?> -
Get notification by tag
override
-
getNotificationTags(
) → Future< List< String> > -
Get all notification tags
override
-
getPlatformVersion(
) → Future< String?> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestPermissions(
) → Future< bool> -
Convenience method checking browser notification support,
wrapper for Dart's native JS notification
Notification.requestPermission()
. Returnstrue
if response matches 'granted'.override -
sendAction(
Map< String, dynamic> data, {String? id}) → Future<void> -
Send action to service worker
override
-
showNotification(
String title, {List< JSNotificationAction> ? actions, int? badge, String? body, Map<String, dynamic> ? data, JSNotificationDirection? dir, String? icon, String? image, String? lang, bool? renotify, bool? requireInteraction, bool? silent, String? tag, int? timestamp, VibratePattern? vibrate}) → Future<void> -
Send notification with customizable parameters to service worker
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited