@@ -68,6 +68,59 @@ class JSNotificationOptions implements Serializable {
6868 this .vibrate,
6969 });
7070
71+ JSNotificationOptions copyWithSelf ({JSNotificationOptions ? options}) {
72+ return JSNotificationOptions (
73+ actions: options? .actions ?? actions,
74+ badge: options? .badge ?? badge,
75+ body: options? .body ?? body,
76+ data: options? .data ?? data,
77+ dir: options? .dir ?? dir,
78+ icon: options? .icon ?? icon,
79+ image: options? .image ?? image,
80+ lang: options? .lang ?? lang,
81+ renotify: options? .renotify ?? renotify,
82+ requireInteraction: options? .requireInteraction ?? requireInteraction,
83+ silent: options? .silent ?? silent,
84+ tag: options? .tag ?? tag,
85+ timestamp: options? .timestamp ?? timestamp,
86+ vibrate: options? .vibrate ?? vibrate,
87+ );
88+ }
89+
90+ JSNotificationOptions copyWith ({
91+ List <JSNotificationAction >? actions,
92+ int ? badge,
93+ String ? body,
94+ Map <String , dynamic >? data,
95+ JSNotificationDirection ? dir,
96+ String ? icon,
97+ String ? image,
98+ String ? lang,
99+ bool ? renotify,
100+ bool ? requireInteraction,
101+ bool ? silent,
102+ String ? tag,
103+ int ? timestamp,
104+ VibratePattern ? vibrate,
105+ }) {
106+ return JSNotificationOptions (
107+ actions: actions ?? this .actions,
108+ badge: badge ?? this .badge,
109+ body: body ?? this .body,
110+ data: data ?? this .data,
111+ dir: dir ?? this .dir,
112+ icon: icon ?? this .icon,
113+ image: image ?? this .image,
114+ lang: lang ?? this .lang,
115+ renotify: renotify ?? this .renotify,
116+ requireInteraction: requireInteraction ?? this .requireInteraction,
117+ silent: silent ?? this .silent,
118+ tag: tag ?? this .tag,
119+ timestamp: timestamp ?? this .timestamp,
120+ vibrate: vibrate ?? this .vibrate,
121+ );
122+ }
123+
71124 @override
72125 Map <String , dynamic > toMap () {
73126 final Map <String , dynamic > map = {};
0 commit comments