1
- // Autogenerated from Pigeon (v25.0.0 ), do not edit directly.
1
+ // Autogenerated from Pigeon (v25.3.1 ), do not edit directly.
2
2
// See also: https://pub.dev/packages/pigeon
3
3
@file:Suppress(" UNCHECKED_CAST" , " ArrayInDataClass" )
4
4
@@ -13,25 +13,57 @@ import io.flutter.plugin.common.StandardMethodCodec
13
13
import io.flutter.plugin.common.StandardMessageCodec
14
14
import java.io.ByteArrayOutputStream
15
15
import java.nio.ByteBuffer
16
+ private object NotificationsPigeonUtils {
16
17
17
- private fun wrapResult (result : Any? ): List <Any ?> {
18
- return listOf (result)
19
- }
18
+ fun wrapResult (result : Any? ): List <Any ?> {
19
+ return listOf (result)
20
+ }
20
21
21
- private fun wrapError (exception : Throwable ): List <Any ?> {
22
- return if (exception is FlutterError ) {
23
- listOf (
24
- exception.code,
25
- exception.message,
26
- exception.details
27
- )
28
- } else {
29
- listOf (
30
- exception.javaClass.simpleName,
31
- exception.toString(),
32
- " Cause: " + exception.cause + " , Stacktrace: " + Log .getStackTraceString(exception)
33
- )
22
+ fun wrapError (exception : Throwable ): List <Any ?> {
23
+ return if (exception is FlutterError ) {
24
+ listOf (
25
+ exception.code,
26
+ exception.message,
27
+ exception.details
28
+ )
29
+ } else {
30
+ listOf (
31
+ exception.javaClass.simpleName,
32
+ exception.toString(),
33
+ " Cause: " + exception.cause + " , Stacktrace: " + Log .getStackTraceString(exception)
34
+ )
35
+ }
36
+ }
37
+ fun deepEquals (a : Any? , b : Any? ): Boolean {
38
+ if (a is ByteArray && b is ByteArray ) {
39
+ return a.contentEquals(b)
40
+ }
41
+ if (a is IntArray && b is IntArray ) {
42
+ return a.contentEquals(b)
43
+ }
44
+ if (a is LongArray && b is LongArray ) {
45
+ return a.contentEquals(b)
46
+ }
47
+ if (a is DoubleArray && b is DoubleArray ) {
48
+ return a.contentEquals(b)
49
+ }
50
+ if (a is Array <* > && b is Array <* >) {
51
+ return a.size == b.size &&
52
+ a.indices.all{ deepEquals(a[it], b[it]) }
53
+ }
54
+ if (a is List <* > && b is List <* >) {
55
+ return a.size == b.size &&
56
+ a.indices.all{ deepEquals(a[it], b[it]) }
57
+ }
58
+ if (a is Map <* , * > && b is Map <* , * >) {
59
+ return a.size == b.size && a.all {
60
+ (b as Map <Any ?, Any ?>).containsKey(it.key) &&
61
+ deepEquals(it.value, b[it.key])
62
+ }
63
+ }
64
+ return a == b
34
65
}
66
+
35
67
}
36
68
37
69
/* *
@@ -89,6 +121,16 @@ data class NotificationChannel (
89
121
vibrationPattern,
90
122
)
91
123
}
124
+ override fun equals (other : Any? ): Boolean {
125
+ if (other !is NotificationChannel ) {
126
+ return false
127
+ }
128
+ if (this == = other) {
129
+ return true
130
+ }
131
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
132
+
133
+ override fun hashCode (): Int = toList().hashCode()
92
134
}
93
135
94
136
/* *
@@ -122,6 +164,16 @@ data class AndroidIntent (
122
164
flags,
123
165
)
124
166
}
167
+ override fun equals (other : Any? ): Boolean {
168
+ if (other !is AndroidIntent ) {
169
+ return false
170
+ }
171
+ if (this == = other) {
172
+ return true
173
+ }
174
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
175
+
176
+ override fun hashCode (): Int = toList().hashCode()
125
177
}
126
178
127
179
/* *
@@ -156,6 +208,16 @@ data class PendingIntent (
156
208
flags,
157
209
)
158
210
}
211
+ override fun equals (other : Any? ): Boolean {
212
+ if (other !is PendingIntent ) {
213
+ return false
214
+ }
215
+ if (this == = other) {
216
+ return true
217
+ }
218
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
219
+
220
+ override fun hashCode (): Int = toList().hashCode()
159
221
}
160
222
161
223
/* *
@@ -180,6 +242,16 @@ data class InboxStyle (
180
242
summaryText,
181
243
)
182
244
}
245
+ override fun equals (other : Any? ): Boolean {
246
+ if (other !is InboxStyle ) {
247
+ return false
248
+ }
249
+ if (this == = other) {
250
+ return true
251
+ }
252
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
253
+
254
+ override fun hashCode (): Int = toList().hashCode()
183
255
}
184
256
185
257
/* *
@@ -220,6 +292,16 @@ data class Person (
220
292
name,
221
293
)
222
294
}
295
+ override fun equals (other : Any? ): Boolean {
296
+ if (other !is Person ) {
297
+ return false
298
+ }
299
+ if (this == = other) {
300
+ return true
301
+ }
302
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
303
+
304
+ override fun hashCode (): Int = toList().hashCode()
223
305
}
224
306
225
307
/* *
@@ -250,6 +332,16 @@ data class MessagingStyleMessage (
250
332
person,
251
333
)
252
334
}
335
+ override fun equals (other : Any? ): Boolean {
336
+ if (other !is MessagingStyleMessage ) {
337
+ return false
338
+ }
339
+ if (this == = other) {
340
+ return true
341
+ }
342
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
343
+
344
+ override fun hashCode (): Int = toList().hashCode()
253
345
}
254
346
255
347
/* *
@@ -283,6 +375,16 @@ data class MessagingStyle (
283
375
isGroupConversation,
284
376
)
285
377
}
378
+ override fun equals (other : Any? ): Boolean {
379
+ if (other !is MessagingStyle ) {
380
+ return false
381
+ }
382
+ if (this == = other) {
383
+ return true
384
+ }
385
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
386
+
387
+ override fun hashCode (): Int = toList().hashCode()
286
388
}
287
389
288
390
/* *
@@ -310,6 +412,16 @@ data class Notification (
310
412
extras,
311
413
)
312
414
}
415
+ override fun equals (other : Any? ): Boolean {
416
+ if (other !is Notification ) {
417
+ return false
418
+ }
419
+ if (this == = other) {
420
+ return true
421
+ }
422
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
423
+
424
+ override fun hashCode (): Int = toList().hashCode()
313
425
}
314
426
315
427
/* *
@@ -340,6 +452,16 @@ data class StatusBarNotification (
340
452
notification,
341
453
)
342
454
}
455
+ override fun equals (other : Any? ): Boolean {
456
+ if (other !is StatusBarNotification ) {
457
+ return false
458
+ }
459
+ if (this == = other) {
460
+ return true
461
+ }
462
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
463
+
464
+ override fun hashCode (): Int = toList().hashCode()
343
465
}
344
466
345
467
/* *
@@ -380,6 +502,16 @@ data class StoredNotificationSound (
380
502
contentUrl,
381
503
)
382
504
}
505
+ override fun equals (other : Any? ): Boolean {
506
+ if (other !is StoredNotificationSound ) {
507
+ return false
508
+ }
509
+ if (this == = other) {
510
+ return true
511
+ }
512
+ return NotificationsPigeonUtils .deepEquals(toList(), other.toList()) }
513
+
514
+ override fun hashCode (): Int = toList().hashCode()
383
515
}
384
516
private open class NotificationsPigeonCodec : StandardMessageCodec () {
385
517
override fun readValueOfType (type : Byte , buffer : ByteBuffer ): Any? {
@@ -605,7 +737,7 @@ interface AndroidNotificationHostApi {
605
737
api.createNotificationChannel(channelArg)
606
738
listOf (null )
607
739
} catch (exception: Throwable ) {
608
- wrapError(exception)
740
+ NotificationsPigeonUtils . wrapError(exception)
609
741
}
610
742
reply.reply(wrapped)
611
743
}
@@ -620,7 +752,7 @@ interface AndroidNotificationHostApi {
620
752
val wrapped: List <Any ?> = try {
621
753
listOf (api.getNotificationChannels())
622
754
} catch (exception: Throwable ) {
623
- wrapError(exception)
755
+ NotificationsPigeonUtils . wrapError(exception)
624
756
}
625
757
reply.reply(wrapped)
626
758
}
@@ -638,7 +770,7 @@ interface AndroidNotificationHostApi {
638
770
api.deleteNotificationChannel(channelIdArg)
639
771
listOf (null )
640
772
} catch (exception: Throwable ) {
641
- wrapError(exception)
773
+ NotificationsPigeonUtils . wrapError(exception)
642
774
}
643
775
reply.reply(wrapped)
644
776
}
@@ -653,7 +785,7 @@ interface AndroidNotificationHostApi {
653
785
val wrapped: List <Any ?> = try {
654
786
listOf (api.listStoredSoundsInNotificationsDirectory())
655
787
} catch (exception: Throwable ) {
656
- wrapError(exception)
788
+ NotificationsPigeonUtils . wrapError(exception)
657
789
}
658
790
reply.reply(wrapped)
659
791
}
@@ -671,7 +803,7 @@ interface AndroidNotificationHostApi {
671
803
val wrapped: List <Any ?> = try {
672
804
listOf (api.copySoundResourceToMediaStore(targetFileDisplayNameArg, sourceResourceNameArg))
673
805
} catch (exception: Throwable ) {
674
- wrapError(exception)
806
+ NotificationsPigeonUtils . wrapError(exception)
675
807
}
676
808
reply.reply(wrapped)
677
809
}
@@ -703,7 +835,7 @@ interface AndroidNotificationHostApi {
703
835
api.notify(tagArg, idArg, autoCancelArg, channelIdArg, colorArg, contentIntentArg, contentTextArg, contentTitleArg, extrasArg, groupKeyArg, inboxStyleArg, isGroupSummaryArg, messagingStyleArg, numberArg, smallIconResourceNameArg)
704
836
listOf (null )
705
837
} catch (exception: Throwable ) {
706
- wrapError(exception)
838
+ NotificationsPigeonUtils . wrapError(exception)
707
839
}
708
840
reply.reply(wrapped)
709
841
}
@@ -720,7 +852,7 @@ interface AndroidNotificationHostApi {
720
852
val wrapped: List <Any ?> = try {
721
853
listOf (api.getActiveNotificationMessagingStyleByTag(tagArg))
722
854
} catch (exception: Throwable ) {
723
- wrapError(exception)
855
+ NotificationsPigeonUtils . wrapError(exception)
724
856
}
725
857
reply.reply(wrapped)
726
858
}
@@ -737,7 +869,7 @@ interface AndroidNotificationHostApi {
737
869
val wrapped: List <Any ?> = try {
738
870
listOf (api.getActiveNotifications(desiredExtrasArg))
739
871
} catch (exception: Throwable ) {
740
- wrapError(exception)
872
+ NotificationsPigeonUtils . wrapError(exception)
741
873
}
742
874
reply.reply(wrapped)
743
875
}
@@ -756,7 +888,7 @@ interface AndroidNotificationHostApi {
756
888
api.cancel(tagArg, idArg)
757
889
listOf (null )
758
890
} catch (exception: Throwable ) {
759
- wrapError(exception)
891
+ NotificationsPigeonUtils . wrapError(exception)
760
892
}
761
893
reply.reply(wrapped)
762
894
}
0 commit comments