1- // Autogenerated from Pigeon (v22.7 .0), do not edit directly.
1+ // Autogenerated from Pigeon (v25.3 .0), do not edit directly.
22// See also: https://pub.dev/packages/pigeon
33@file:Suppress(" UNCHECKED_CAST" , " ArrayInDataClass" )
44
@@ -44,6 +44,36 @@ class WakelockPlusFlutterError (
4444 override val message : String? = null ,
4545 val details : Any? = null
4646) : Throwable()
47+ private fun deepEqualsWakelockPlusMessages (a : Any? , b : Any? ): Boolean {
48+ if (a is ByteArray && b is ByteArray ) {
49+ return a.contentEquals(b)
50+ }
51+ if (a is IntArray && b is IntArray ) {
52+ return a.contentEquals(b)
53+ }
54+ if (a is LongArray && b is LongArray ) {
55+ return a.contentEquals(b)
56+ }
57+ if (a is DoubleArray && b is DoubleArray ) {
58+ return a.contentEquals(b)
59+ }
60+ if (a is Array <* > && b is Array <* >) {
61+ return a.size == b.size &&
62+ a.indices.all{ deepEqualsWakelockPlusMessages(a[it], b[it]) }
63+ }
64+ if (a is List <* > && b is List <* >) {
65+ return a.size == b.size &&
66+ a.indices.all{ deepEqualsWakelockPlusMessages(a[it], b[it]) }
67+ }
68+ if (a is Map <* , * > && b is Map <* , * >) {
69+ return a.size == b.size && a.all {
70+ (b as Map <Any ?, Any ?>).containsKey(it.key) &&
71+ deepEqualsWakelockPlusMessages(it.value, b[it.key])
72+ }
73+ }
74+ return a == b
75+ }
76+
4777
4878/* *
4979 * Message for toggling the wakelock on the platform side.
@@ -65,6 +95,16 @@ data class ToggleMessage (
6595 enable,
6696 )
6797 }
98+ override fun equals (other : Any? ): Boolean {
99+ if (other !is ToggleMessage ) {
100+ return false
101+ }
102+ if (this == = other) {
103+ return true
104+ }
105+ return deepEqualsWakelockPlusMessages(toList(), other.toList()) }
106+
107+ override fun hashCode (): Int = toList().hashCode()
68108}
69109
70110/* *
@@ -87,6 +127,16 @@ data class IsEnabledMessage (
87127 enabled,
88128 )
89129 }
130+ override fun equals (other : Any? ): Boolean {
131+ if (other !is IsEnabledMessage ) {
132+ return false
133+ }
134+ if (this == = other) {
135+ return true
136+ }
137+ return deepEqualsWakelockPlusMessages(toList(), other.toList()) }
138+
139+ override fun hashCode (): Int = toList().hashCode()
90140}
91141private open class WakelockPlusMessagesPigeonCodec : StandardMessageCodec () {
92142 override fun readValueOfType (type : Byte , buffer : ByteBuffer ): Any? {
0 commit comments