chore: pump auto_route (#27876)

* chore: pump auto_route

* make build

* chore: use drift from pubdev (#27877)

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2026-04-18 01:58:36 +05:30
committed by GitHub
parent 6798d5df32
commit fd5e8d6521
36 changed files with 1826 additions and 940 deletions
+6
View File
@@ -6,6 +6,12 @@ mobile/openapi/**/*.dart linguist-generated=true
mobile/lib/**/*.g.dart -diff -merge mobile/lib/**/*.g.dart -diff -merge
mobile/lib/**/*.g.dart linguist-generated=true mobile/lib/**/*.g.dart linguist-generated=true
mobile/android/**/*.g.kt -diff -merge
mobile/android/**/*.g.kt linguist-generated=true
mobile/ios/**/*.g.swift -diff -merge
mobile/ios/**/*.g.swift linguist-generated=true
mobile/lib/**/*.drift.dart -diff -merge mobile/lib/**/*.drift.dart -diff -merge
mobile/lib/**/*.drift.dart linguist-generated=true mobile/lib/**/*.drift.dart linguist-generated=true
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
@@ -37,7 +37,36 @@ private object BackgroundWorkerPigeonUtils {
) )
} }
} }
fun doubleEquals(a: Double, b: Double): Boolean {
// Normalize -0.0 to 0.0 and handle NaN equality.
return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN())
}
fun floatEquals(a: Float, b: Float): Boolean {
// Normalize -0.0 to 0.0 and handle NaN equality.
return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN())
}
fun doubleHash(d: Double): Int {
// Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes.
val normalized = if (d == 0.0) 0.0 else d
val bits = java.lang.Double.doubleToLongBits(normalized)
return (bits xor (bits ushr 32)).toInt()
}
fun floatHash(f: Float): Int {
// Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes.
val normalized = if (f == 0.0f) 0.0f else f
return java.lang.Float.floatToIntBits(normalized)
}
fun deepEquals(a: Any?, b: Any?): Boolean { fun deepEquals(a: Any?, b: Any?): Boolean {
if (a === b) {
return true
}
if (a == null || b == null) {
return false
}
if (a is ByteArray && b is ByteArray) { if (a is ByteArray && b is ByteArray) {
return a.contentEquals(b) return a.contentEquals(b)
} }
@@ -48,25 +77,110 @@ private object BackgroundWorkerPigeonUtils {
return a.contentEquals(b) return a.contentEquals(b)
} }
if (a is DoubleArray && b is DoubleArray) { if (a is DoubleArray && b is DoubleArray) {
return a.contentEquals(b) if (a.size != b.size) return false
for (i in a.indices) {
if (!doubleEquals(a[i], b[i])) return false
}
return true
}
if (a is FloatArray && b is FloatArray) {
if (a.size != b.size) return false
for (i in a.indices) {
if (!floatEquals(a[i], b[i])) return false
}
return true
} }
if (a is Array<*> && b is Array<*>) { if (a is Array<*> && b is Array<*>) {
return a.size == b.size && if (a.size != b.size) return false
a.indices.all{ deepEquals(a[it], b[it]) } for (i in a.indices) {
if (!deepEquals(a[i], b[i])) return false
}
return true
} }
if (a is List<*> && b is List<*>) { if (a is List<*> && b is List<*>) {
return a.size == b.size && if (a.size != b.size) return false
a.indices.all{ deepEquals(a[it], b[it]) } val iterA = a.iterator()
val iterB = b.iterator()
while (iterA.hasNext() && iterB.hasNext()) {
if (!deepEquals(iterA.next(), iterB.next())) return false
}
return true
} }
if (a is Map<*, *> && b is Map<*, *>) { if (a is Map<*, *> && b is Map<*, *>) {
return a.size == b.size && a.all { if (a.size != b.size) return false
(b as Map<Any?, Any?>).containsKey(it.key) && for (entry in a) {
deepEquals(it.value, b[it.key]) val key = entry.key
var found = false
for (bEntry in b) {
if (deepEquals(key, bEntry.key)) {
if (deepEquals(entry.value, bEntry.value)) {
found = true
break
} else {
return false
} }
} }
}
if (!found) return false
}
return true
}
if (a is Double && b is Double) {
return doubleEquals(a, b)
}
if (a is Float && b is Float) {
return floatEquals(a, b)
}
return a == b return a == b
} }
fun deepHash(value: Any?): Int {
return when (value) {
null -> 0
is ByteArray -> value.contentHashCode()
is IntArray -> value.contentHashCode()
is LongArray -> value.contentHashCode()
is DoubleArray -> {
var result = 1
for (item in value) {
result = 31 * result + doubleHash(item)
}
result
}
is FloatArray -> {
var result = 1
for (item in value) {
result = 31 * result + floatHash(item)
}
result
}
is Array<*> -> {
var result = 1
for (item in value) {
result = 31 * result + deepHash(item)
}
result
}
is List<*> -> {
var result = 1
for (item in value) {
result = 31 * result + deepHash(item)
}
result
}
is Map<*, *> -> {
var result = 0
for (entry in value) {
result += ((deepHash(entry.key) * 31) xor deepHash(entry.value))
}
result
}
is Double -> doubleHash(value)
is Float -> floatHash(value)
else -> value.hashCode()
}
}
} }
/** /**
@@ -79,7 +193,7 @@ class FlutterError (
val code: String, val code: String,
override val message: String? = null, override val message: String? = null,
val details: Any? = null val details: Any? = null
) : Throwable() ) : RuntimeException()
/** Generated class from Pigeon that represents data sent in messages. */ /** Generated class from Pigeon that represents data sent in messages. */
data class BackgroundWorkerSettings ( data class BackgroundWorkerSettings (
@@ -101,15 +215,22 @@ data class BackgroundWorkerSettings (
) )
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (other !is BackgroundWorkerSettings) { if (other == null || other.javaClass != javaClass) {
return false return false
} }
if (this === other) { if (this === other) {
return true return true
} }
return BackgroundWorkerPigeonUtils.deepEquals(toList(), other.toList()) } val other = other as BackgroundWorkerSettings
return BackgroundWorkerPigeonUtils.deepEquals(this.requiresCharging, other.requiresCharging) && BackgroundWorkerPigeonUtils.deepEquals(this.minimumDelaySeconds, other.minimumDelaySeconds)
}
override fun hashCode(): Int = toList().hashCode() override fun hashCode(): Int {
var result = javaClass.hashCode()
result = 31 * result + BackgroundWorkerPigeonUtils.deepHash(this.requiresCharging)
result = 31 * result + BackgroundWorkerPigeonUtils.deepHash(this.minimumDelaySeconds)
return result
}
} }
private open class BackgroundWorkerPigeonCodec : StandardMessageCodec() { private open class BackgroundWorkerPigeonCodec : StandardMessageCodec() {
override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? {
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
@@ -46,7 +46,7 @@ class FlutterError (
val code: String, val code: String,
override val message: String? = null, override val message: String? = null,
val details: Any? = null val details: Any? = null
) : Throwable() ) : RuntimeException()
enum class NetworkCapability(val raw: Int) { enum class NetworkCapability(val raw: Int) {
CELLULAR(0), CELLULAR(0),
@@ -75,7 +75,7 @@ private open class ConnectivityPigeonCodec : StandardMessageCodec() {
when (value) { when (value) {
is NetworkCapability -> { is NetworkCapability -> {
stream.write(129) stream.write(129)
writeValue(stream, value.raw) writeValue(stream, value.raw.toLong())
} }
else -> super.writeValue(stream, value) else -> super.writeValue(stream, value)
} }
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
@@ -34,7 +34,36 @@ private object NetworkPigeonUtils {
) )
} }
} }
fun doubleEquals(a: Double, b: Double): Boolean {
// Normalize -0.0 to 0.0 and handle NaN equality.
return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN())
}
fun floatEquals(a: Float, b: Float): Boolean {
// Normalize -0.0 to 0.0 and handle NaN equality.
return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN())
}
fun doubleHash(d: Double): Int {
// Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes.
val normalized = if (d == 0.0) 0.0 else d
val bits = java.lang.Double.doubleToLongBits(normalized)
return (bits xor (bits ushr 32)).toInt()
}
fun floatHash(f: Float): Int {
// Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes.
val normalized = if (f == 0.0f) 0.0f else f
return java.lang.Float.floatToIntBits(normalized)
}
fun deepEquals(a: Any?, b: Any?): Boolean { fun deepEquals(a: Any?, b: Any?): Boolean {
if (a === b) {
return true
}
if (a == null || b == null) {
return false
}
if (a is ByteArray && b is ByteArray) { if (a is ByteArray && b is ByteArray) {
return a.contentEquals(b) return a.contentEquals(b)
} }
@@ -45,25 +74,110 @@ private object NetworkPigeonUtils {
return a.contentEquals(b) return a.contentEquals(b)
} }
if (a is DoubleArray && b is DoubleArray) { if (a is DoubleArray && b is DoubleArray) {
return a.contentEquals(b) if (a.size != b.size) return false
for (i in a.indices) {
if (!doubleEquals(a[i], b[i])) return false
}
return true
}
if (a is FloatArray && b is FloatArray) {
if (a.size != b.size) return false
for (i in a.indices) {
if (!floatEquals(a[i], b[i])) return false
}
return true
} }
if (a is Array<*> && b is Array<*>) { if (a is Array<*> && b is Array<*>) {
return a.size == b.size && if (a.size != b.size) return false
a.indices.all{ deepEquals(a[it], b[it]) } for (i in a.indices) {
if (!deepEquals(a[i], b[i])) return false
}
return true
} }
if (a is List<*> && b is List<*>) { if (a is List<*> && b is List<*>) {
return a.size == b.size && if (a.size != b.size) return false
a.indices.all{ deepEquals(a[it], b[it]) } val iterA = a.iterator()
val iterB = b.iterator()
while (iterA.hasNext() && iterB.hasNext()) {
if (!deepEquals(iterA.next(), iterB.next())) return false
}
return true
} }
if (a is Map<*, *> && b is Map<*, *>) { if (a is Map<*, *> && b is Map<*, *>) {
return a.size == b.size && a.all { if (a.size != b.size) return false
(b as Map<Any?, Any?>).containsKey(it.key) && for (entry in a) {
deepEquals(it.value, b[it.key]) val key = entry.key
var found = false
for (bEntry in b) {
if (deepEquals(key, bEntry.key)) {
if (deepEquals(entry.value, bEntry.value)) {
found = true
break
} else {
return false
} }
} }
}
if (!found) return false
}
return true
}
if (a is Double && b is Double) {
return doubleEquals(a, b)
}
if (a is Float && b is Float) {
return floatEquals(a, b)
}
return a == b return a == b
} }
fun deepHash(value: Any?): Int {
return when (value) {
null -> 0
is ByteArray -> value.contentHashCode()
is IntArray -> value.contentHashCode()
is LongArray -> value.contentHashCode()
is DoubleArray -> {
var result = 1
for (item in value) {
result = 31 * result + doubleHash(item)
}
result
}
is FloatArray -> {
var result = 1
for (item in value) {
result = 31 * result + floatHash(item)
}
result
}
is Array<*> -> {
var result = 1
for (item in value) {
result = 31 * result + deepHash(item)
}
result
}
is List<*> -> {
var result = 1
for (item in value) {
result = 31 * result + deepHash(item)
}
result
}
is Map<*, *> -> {
var result = 0
for (entry in value) {
result += ((deepHash(entry.key) * 31) xor deepHash(entry.value))
}
result
}
is Double -> doubleHash(value)
is Float -> floatHash(value)
else -> value.hashCode()
}
}
} }
/** /**
@@ -76,7 +190,7 @@ class FlutterError (
val code: String, val code: String,
override val message: String? = null, override val message: String? = null,
val details: Any? = null val details: Any? = null
) : Throwable() ) : RuntimeException()
/** Generated class from Pigeon that represents data sent in messages. */ /** Generated class from Pigeon that represents data sent in messages. */
data class ClientCertData ( data class ClientCertData (
@@ -98,15 +212,22 @@ data class ClientCertData (
) )
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (other !is ClientCertData) { if (other == null || other.javaClass != javaClass) {
return false return false
} }
if (this === other) { if (this === other) {
return true return true
} }
return NetworkPigeonUtils.deepEquals(toList(), other.toList()) } val other = other as ClientCertData
return NetworkPigeonUtils.deepEquals(this.data, other.data) && NetworkPigeonUtils.deepEquals(this.password, other.password)
}
override fun hashCode(): Int = toList().hashCode() override fun hashCode(): Int {
var result = javaClass.hashCode()
result = 31 * result + NetworkPigeonUtils.deepHash(this.data)
result = 31 * result + NetworkPigeonUtils.deepHash(this.password)
return result
}
} }
/** Generated class from Pigeon that represents data sent in messages. */ /** Generated class from Pigeon that represents data sent in messages. */
@@ -135,15 +256,24 @@ data class ClientCertPrompt (
) )
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (other !is ClientCertPrompt) { if (other == null || other.javaClass != javaClass) {
return false return false
} }
if (this === other) { if (this === other) {
return true return true
} }
return NetworkPigeonUtils.deepEquals(toList(), other.toList()) } val other = other as ClientCertPrompt
return NetworkPigeonUtils.deepEquals(this.title, other.title) && NetworkPigeonUtils.deepEquals(this.message, other.message) && NetworkPigeonUtils.deepEquals(this.cancel, other.cancel) && NetworkPigeonUtils.deepEquals(this.confirm, other.confirm)
}
override fun hashCode(): Int = toList().hashCode() override fun hashCode(): Int {
var result = javaClass.hashCode()
result = 31 * result + NetworkPigeonUtils.deepHash(this.title)
result = 31 * result + NetworkPigeonUtils.deepHash(this.message)
result = 31 * result + NetworkPigeonUtils.deepHash(this.cancel)
result = 31 * result + NetworkPigeonUtils.deepHash(this.confirm)
return result
}
} }
private open class NetworkPigeonCodec : StandardMessageCodec() { private open class NetworkPigeonCodec : StandardMessageCodec() {
override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? {
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
@@ -46,7 +46,7 @@ class FlutterError (
val code: String, val code: String,
override val message: String? = null, override val message: String? = null,
val details: Any? = null val details: Any? = null
) : Throwable() ) : RuntimeException()
private open class LocalImagesPigeonCodec : StandardMessageCodec() { private open class LocalImagesPigeonCodec : StandardMessageCodec() {
override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? {
return super.readValueOfType(type, buffer) return super.readValueOfType(type, buffer)
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")
@@ -34,7 +34,36 @@ private object MessagesPigeonUtils {
) )
} }
} }
fun doubleEquals(a: Double, b: Double): Boolean {
// Normalize -0.0 to 0.0 and handle NaN equality.
return (if (a == 0.0) 0.0 else a) == (if (b == 0.0) 0.0 else b) || (a.isNaN() && b.isNaN())
}
fun floatEquals(a: Float, b: Float): Boolean {
// Normalize -0.0 to 0.0 and handle NaN equality.
return (if (a == 0.0f) 0.0f else a) == (if (b == 0.0f) 0.0f else b) || (a.isNaN() && b.isNaN())
}
fun doubleHash(d: Double): Int {
// Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes.
val normalized = if (d == 0.0) 0.0 else d
val bits = java.lang.Double.doubleToLongBits(normalized)
return (bits xor (bits ushr 32)).toInt()
}
fun floatHash(f: Float): Int {
// Normalize -0.0 to 0.0 and handle NaN to ensure consistent hash codes.
val normalized = if (f == 0.0f) 0.0f else f
return java.lang.Float.floatToIntBits(normalized)
}
fun deepEquals(a: Any?, b: Any?): Boolean { fun deepEquals(a: Any?, b: Any?): Boolean {
if (a === b) {
return true
}
if (a == null || b == null) {
return false
}
if (a is ByteArray && b is ByteArray) { if (a is ByteArray && b is ByteArray) {
return a.contentEquals(b) return a.contentEquals(b)
} }
@@ -45,25 +74,110 @@ private object MessagesPigeonUtils {
return a.contentEquals(b) return a.contentEquals(b)
} }
if (a is DoubleArray && b is DoubleArray) { if (a is DoubleArray && b is DoubleArray) {
return a.contentEquals(b) if (a.size != b.size) return false
for (i in a.indices) {
if (!doubleEquals(a[i], b[i])) return false
}
return true
}
if (a is FloatArray && b is FloatArray) {
if (a.size != b.size) return false
for (i in a.indices) {
if (!floatEquals(a[i], b[i])) return false
}
return true
} }
if (a is Array<*> && b is Array<*>) { if (a is Array<*> && b is Array<*>) {
return a.size == b.size && if (a.size != b.size) return false
a.indices.all{ deepEquals(a[it], b[it]) } for (i in a.indices) {
if (!deepEquals(a[i], b[i])) return false
}
return true
} }
if (a is List<*> && b is List<*>) { if (a is List<*> && b is List<*>) {
return a.size == b.size && if (a.size != b.size) return false
a.indices.all{ deepEquals(a[it], b[it]) } val iterA = a.iterator()
val iterB = b.iterator()
while (iterA.hasNext() && iterB.hasNext()) {
if (!deepEquals(iterA.next(), iterB.next())) return false
}
return true
} }
if (a is Map<*, *> && b is Map<*, *>) { if (a is Map<*, *> && b is Map<*, *>) {
return a.size == b.size && a.all { if (a.size != b.size) return false
(b as Map<Any?, Any?>).containsKey(it.key) && for (entry in a) {
deepEquals(it.value, b[it.key]) val key = entry.key
var found = false
for (bEntry in b) {
if (deepEquals(key, bEntry.key)) {
if (deepEquals(entry.value, bEntry.value)) {
found = true
break
} else {
return false
} }
} }
}
if (!found) return false
}
return true
}
if (a is Double && b is Double) {
return doubleEquals(a, b)
}
if (a is Float && b is Float) {
return floatEquals(a, b)
}
return a == b return a == b
} }
fun deepHash(value: Any?): Int {
return when (value) {
null -> 0
is ByteArray -> value.contentHashCode()
is IntArray -> value.contentHashCode()
is LongArray -> value.contentHashCode()
is DoubleArray -> {
var result = 1
for (item in value) {
result = 31 * result + doubleHash(item)
}
result
}
is FloatArray -> {
var result = 1
for (item in value) {
result = 31 * result + floatHash(item)
}
result
}
is Array<*> -> {
var result = 1
for (item in value) {
result = 31 * result + deepHash(item)
}
result
}
is List<*> -> {
var result = 1
for (item in value) {
result = 31 * result + deepHash(item)
}
result
}
is Map<*, *> -> {
var result = 0
for (entry in value) {
result += ((deepHash(entry.key) * 31) xor deepHash(entry.value))
}
result
}
is Double -> doubleHash(value)
is Float -> floatHash(value)
else -> value.hashCode()
}
}
} }
/** /**
@@ -76,7 +190,7 @@ class FlutterError (
val code: String, val code: String,
override val message: String? = null, override val message: String? = null,
val details: Any? = null val details: Any? = null
) : Throwable() ) : RuntimeException()
enum class PlatformAssetPlaybackStyle(val raw: Int) { enum class PlatformAssetPlaybackStyle(val raw: Int) {
UNKNOWN(0), UNKNOWN(0),
@@ -149,15 +263,34 @@ data class PlatformAsset (
) )
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (other !is PlatformAsset) { if (other == null || other.javaClass != javaClass) {
return false return false
} }
if (this === other) { if (this === other) {
return true return true
} }
return MessagesPigeonUtils.deepEquals(toList(), other.toList()) } val other = other as PlatformAsset
return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.type, other.type) && MessagesPigeonUtils.deepEquals(this.createdAt, other.createdAt) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.width, other.width) && MessagesPigeonUtils.deepEquals(this.height, other.height) && MessagesPigeonUtils.deepEquals(this.durationInSeconds, other.durationInSeconds) && MessagesPigeonUtils.deepEquals(this.orientation, other.orientation) && MessagesPigeonUtils.deepEquals(this.isFavorite, other.isFavorite) && MessagesPigeonUtils.deepEquals(this.adjustmentTime, other.adjustmentTime) && MessagesPigeonUtils.deepEquals(this.latitude, other.latitude) && MessagesPigeonUtils.deepEquals(this.longitude, other.longitude) && MessagesPigeonUtils.deepEquals(this.playbackStyle, other.playbackStyle)
}
override fun hashCode(): Int = toList().hashCode() override fun hashCode(): Int {
var result = javaClass.hashCode()
result = 31 * result + MessagesPigeonUtils.deepHash(this.id)
result = 31 * result + MessagesPigeonUtils.deepHash(this.name)
result = 31 * result + MessagesPigeonUtils.deepHash(this.type)
result = 31 * result + MessagesPigeonUtils.deepHash(this.createdAt)
result = 31 * result + MessagesPigeonUtils.deepHash(this.updatedAt)
result = 31 * result + MessagesPigeonUtils.deepHash(this.width)
result = 31 * result + MessagesPigeonUtils.deepHash(this.height)
result = 31 * result + MessagesPigeonUtils.deepHash(this.durationInSeconds)
result = 31 * result + MessagesPigeonUtils.deepHash(this.orientation)
result = 31 * result + MessagesPigeonUtils.deepHash(this.isFavorite)
result = 31 * result + MessagesPigeonUtils.deepHash(this.adjustmentTime)
result = 31 * result + MessagesPigeonUtils.deepHash(this.latitude)
result = 31 * result + MessagesPigeonUtils.deepHash(this.longitude)
result = 31 * result + MessagesPigeonUtils.deepHash(this.playbackStyle)
return result
}
} }
/** Generated class from Pigeon that represents data sent in messages. */ /** Generated class from Pigeon that represents data sent in messages. */
@@ -189,15 +322,25 @@ data class PlatformAlbum (
) )
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (other !is PlatformAlbum) { if (other == null || other.javaClass != javaClass) {
return false return false
} }
if (this === other) { if (this === other) {
return true return true
} }
return MessagesPigeonUtils.deepEquals(toList(), other.toList()) } val other = other as PlatformAlbum
return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.isCloud, other.isCloud) && MessagesPigeonUtils.deepEquals(this.assetCount, other.assetCount)
}
override fun hashCode(): Int = toList().hashCode() override fun hashCode(): Int {
var result = javaClass.hashCode()
result = 31 * result + MessagesPigeonUtils.deepHash(this.id)
result = 31 * result + MessagesPigeonUtils.deepHash(this.name)
result = 31 * result + MessagesPigeonUtils.deepHash(this.updatedAt)
result = 31 * result + MessagesPigeonUtils.deepHash(this.isCloud)
result = 31 * result + MessagesPigeonUtils.deepHash(this.assetCount)
return result
}
} }
/** Generated class from Pigeon that represents data sent in messages. */ /** Generated class from Pigeon that represents data sent in messages. */
@@ -226,15 +369,24 @@ data class SyncDelta (
) )
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (other !is SyncDelta) { if (other == null || other.javaClass != javaClass) {
return false return false
} }
if (this === other) { if (this === other) {
return true return true
} }
return MessagesPigeonUtils.deepEquals(toList(), other.toList()) } val other = other as SyncDelta
return MessagesPigeonUtils.deepEquals(this.hasChanges, other.hasChanges) && MessagesPigeonUtils.deepEquals(this.updates, other.updates) && MessagesPigeonUtils.deepEquals(this.deletes, other.deletes) && MessagesPigeonUtils.deepEquals(this.assetAlbums, other.assetAlbums)
}
override fun hashCode(): Int = toList().hashCode() override fun hashCode(): Int {
var result = javaClass.hashCode()
result = 31 * result + MessagesPigeonUtils.deepHash(this.hasChanges)
result = 31 * result + MessagesPigeonUtils.deepHash(this.updates)
result = 31 * result + MessagesPigeonUtils.deepHash(this.deletes)
result = 31 * result + MessagesPigeonUtils.deepHash(this.assetAlbums)
return result
}
} }
/** Generated class from Pigeon that represents data sent in messages. */ /** Generated class from Pigeon that represents data sent in messages. */
@@ -260,15 +412,23 @@ data class HashResult (
) )
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (other !is HashResult) { if (other == null || other.javaClass != javaClass) {
return false return false
} }
if (this === other) { if (this === other) {
return true return true
} }
return MessagesPigeonUtils.deepEquals(toList(), other.toList()) } val other = other as HashResult
return MessagesPigeonUtils.deepEquals(this.assetId, other.assetId) && MessagesPigeonUtils.deepEquals(this.error, other.error) && MessagesPigeonUtils.deepEquals(this.hash, other.hash)
}
override fun hashCode(): Int = toList().hashCode() override fun hashCode(): Int {
var result = javaClass.hashCode()
result = 31 * result + MessagesPigeonUtils.deepHash(this.assetId)
result = 31 * result + MessagesPigeonUtils.deepHash(this.error)
result = 31 * result + MessagesPigeonUtils.deepHash(this.hash)
return result
}
} }
/** Generated class from Pigeon that represents data sent in messages. */ /** Generated class from Pigeon that represents data sent in messages. */
@@ -294,15 +454,23 @@ data class CloudIdResult (
) )
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (other !is CloudIdResult) { if (other == null || other.javaClass != javaClass) {
return false return false
} }
if (this === other) { if (this === other) {
return true return true
} }
return MessagesPigeonUtils.deepEquals(toList(), other.toList()) } val other = other as CloudIdResult
return MessagesPigeonUtils.deepEquals(this.assetId, other.assetId) && MessagesPigeonUtils.deepEquals(this.error, other.error) && MessagesPigeonUtils.deepEquals(this.cloudId, other.cloudId)
}
override fun hashCode(): Int = toList().hashCode() override fun hashCode(): Int {
var result = javaClass.hashCode()
result = 31 * result + MessagesPigeonUtils.deepHash(this.assetId)
result = 31 * result + MessagesPigeonUtils.deepHash(this.error)
result = 31 * result + MessagesPigeonUtils.deepHash(this.cloudId)
return result
}
} }
private open class MessagesPigeonCodec : StandardMessageCodec() { private open class MessagesPigeonCodec : StandardMessageCodec() {
override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? { override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? {
@@ -344,7 +512,7 @@ private open class MessagesPigeonCodec : StandardMessageCodec() {
when (value) { when (value) {
is PlatformAssetPlaybackStyle -> { is PlatformAssetPlaybackStyle -> {
stream.write(129) stream.write(129)
writeValue(stream, value.raw) writeValue(stream, value.raw.toLong())
} }
is PlatformAsset -> { is PlatformAsset -> {
stream.write(130) stream.write(130)
+85 -32
View File
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
import Foundation import Foundation
@@ -32,7 +32,7 @@ private func wrapError(_ error: Any) -> [Any?] {
} }
return [ return [
"\(error)", "\(error)",
"\(type(of: error))", "\(Swift.type(of: error))",
"Stacktrace: \(Thread.callStackSymbols)", "Stacktrace: \(Thread.callStackSymbols)",
] ]
} }
@@ -50,6 +50,19 @@ private func nilOrValue<T>(_ value: Any?) -> T? {
return value as! T? return value as! T?
} }
private func doubleEqualsBackgroundWorker(_ lhs: Double, _ rhs: Double) -> Bool {
return (lhs.isNaN && rhs.isNaN) || lhs == rhs
}
private func doubleHashBackgroundWorker(_ value: Double, _ hasher: inout Hasher) {
if value.isNaN {
hasher.combine(0x7FF8000000000000)
} else {
// Normalize -0.0 to 0.0
hasher.combine(value == 0 ? 0 : value)
}
}
func deepEqualsBackgroundWorker(_ lhs: Any?, _ rhs: Any?) -> Bool { func deepEqualsBackgroundWorker(_ lhs: Any?, _ rhs: Any?) -> Bool {
let cleanLhs = nilOrValue(lhs) as Any? let cleanLhs = nilOrValue(lhs) as Any?
let cleanRhs = nilOrValue(rhs) as Any? let cleanRhs = nilOrValue(rhs) as Any?
@@ -60,60 +73,93 @@ func deepEqualsBackgroundWorker(_ lhs: Any?, _ rhs: Any?) -> Bool {
case (nil, _), (_, nil): case (nil, _), (_, nil):
return false return false
case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs:
return true
case is (Void, Void): case is (Void, Void):
return true return true
case let (cleanLhsHashable, cleanRhsHashable) as (AnyHashable, AnyHashable): case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
return cleanLhsHashable == cleanRhsHashable guard lhsArray.count == rhsArray.count else { return false }
for (index, element) in lhsArray.enumerated() {
case let (cleanLhsArray, cleanRhsArray) as ([Any?], [Any?]): if !deepEqualsBackgroundWorker(element, rhsArray[index]) {
guard cleanLhsArray.count == cleanRhsArray.count else { return false }
for (index, element) in cleanLhsArray.enumerated() {
if !deepEqualsBackgroundWorker(element, cleanRhsArray[index]) {
return false return false
} }
} }
return true return true
case let (cleanLhsDictionary, cleanRhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): case (let lhsArray, let rhsArray) as ([Double], [Double]):
guard cleanLhsDictionary.count == cleanRhsDictionary.count else { return false } guard lhsArray.count == rhsArray.count else { return false }
for (key, cleanLhsValue) in cleanLhsDictionary { for (index, element) in lhsArray.enumerated() {
guard cleanRhsDictionary.index(forKey: key) != nil else { return false } if !doubleEqualsBackgroundWorker(element, rhsArray[index]) {
if !deepEqualsBackgroundWorker(cleanLhsValue, cleanRhsDictionary[key]!) {
return false return false
} }
} }
return true return true
case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]):
guard lhsDictionary.count == rhsDictionary.count else { return false }
for (lhsKey, lhsValue) in lhsDictionary {
var found = false
for (rhsKey, rhsValue) in rhsDictionary {
if deepEqualsBackgroundWorker(lhsKey, rhsKey) {
if deepEqualsBackgroundWorker(lhsValue, rhsValue) {
found = true
break
} else {
return false
}
}
}
if !found { return false }
}
return true
case (let lhs as Double, let rhs as Double):
return doubleEqualsBackgroundWorker(lhs, rhs)
case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable):
return lhsHashable == rhsHashable
default: default:
// Any other type shouldn't be able to be used with pigeon. File an issue if you find this to be untrue.
return false return false
} }
} }
func deepHashBackgroundWorker(value: Any?, hasher: inout Hasher) { func deepHashBackgroundWorker(value: Any?, hasher: inout Hasher) {
if let valueList = value as? [AnyHashable] { let cleanValue = nilOrValue(value) as Any?
for item in valueList { deepHashBackgroundWorker(value: item, hasher: &hasher) } if let cleanValue = cleanValue {
return if let doubleValue = cleanValue as? Double {
doubleHashBackgroundWorker(doubleValue, &hasher)
} else if let valueList = cleanValue as? [Any?] {
for item in valueList {
deepHashBackgroundWorker(value: item, hasher: &hasher)
} }
} else if let valueList = cleanValue as? [Double] {
if let valueDict = value as? [AnyHashable: AnyHashable] { for item in valueList {
for key in valueDict.keys { doubleHashBackgroundWorker(item, &hasher)
hasher.combine(key)
deepHashBackgroundWorker(value: valueDict[key]!, hasher: &hasher)
} }
return } else if let valueDict = cleanValue as? [AnyHashable: Any?] {
var result = 0
for (key, value) in valueDict {
var entryKeyHasher = Hasher()
deepHashBackgroundWorker(value: key, hasher: &entryKeyHasher)
var entryValueHasher = Hasher()
deepHashBackgroundWorker(value: value, hasher: &entryValueHasher)
result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize())
} }
hasher.combine(result)
if let hashableValue = value as? AnyHashable { } else if let hashableValue = cleanValue as? AnyHashable {
hasher.combine(hashableValue.hashValue) hasher.combine(hashableValue)
} else {
hasher.combine(String(describing: cleanValue))
}
} else {
hasher.combine(0)
} }
return hasher.combine(String(describing: value))
} }
/// Generated class from Pigeon that represents data sent in messages. /// Generated class from Pigeon that represents data sent in messages.
struct BackgroundWorkerSettings: Hashable { struct BackgroundWorkerSettings: Hashable {
var requiresCharging: Bool var requiresCharging: Bool
@@ -137,9 +183,16 @@ struct BackgroundWorkerSettings: Hashable {
] ]
} }
static func == (lhs: BackgroundWorkerSettings, rhs: BackgroundWorkerSettings) -> Bool { static func == (lhs: BackgroundWorkerSettings, rhs: BackgroundWorkerSettings) -> Bool {
return deepEqualsBackgroundWorker(lhs.toList(), rhs.toList()) } if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
return deepEqualsBackgroundWorker(lhs.requiresCharging, rhs.requiresCharging) && deepEqualsBackgroundWorker(lhs.minimumDelaySeconds, rhs.minimumDelaySeconds)
}
func hash(into hasher: inout Hasher) { func hash(into hasher: inout Hasher) {
deepHashBackgroundWorker(value: toList(), hasher: &hasher) hasher.combine("BackgroundWorkerSettings")
deepHashBackgroundWorker(value: requiresCharging, hasher: &hasher)
deepHashBackgroundWorker(value: minimumDelaySeconds, hasher: &hasher)
} }
} }
+2 -2
View File
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
import Foundation import Foundation
@@ -32,7 +32,7 @@ private func wrapError(_ error: Any) -> [Any?] {
} }
return [ return [
"\(error)", "\(error)",
"\(type(of: error))", "\(Swift.type(of: error))",
"Stacktrace: \(Thread.callStackSymbols)", "Stacktrace: \(Thread.callStackSymbols)",
] ]
} }
+96 -34
View File
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
import Foundation import Foundation
@@ -32,7 +32,7 @@ private func wrapError(_ error: Any) -> [Any?] {
} }
return [ return [
"\(error)", "\(error)",
"\(type(of: error))", "\(Swift.type(of: error))",
"Stacktrace: \(Thread.callStackSymbols)", "Stacktrace: \(Thread.callStackSymbols)",
] ]
} }
@@ -46,6 +46,19 @@ private func nilOrValue<T>(_ value: Any?) -> T? {
return value as! T? return value as! T?
} }
private func doubleEqualsNetwork(_ lhs: Double, _ rhs: Double) -> Bool {
return (lhs.isNaN && rhs.isNaN) || lhs == rhs
}
private func doubleHashNetwork(_ value: Double, _ hasher: inout Hasher) {
if value.isNaN {
hasher.combine(0x7FF8000000000000)
} else {
// Normalize -0.0 to 0.0
hasher.combine(value == 0 ? 0 : value)
}
}
func deepEqualsNetwork(_ lhs: Any?, _ rhs: Any?) -> Bool { func deepEqualsNetwork(_ lhs: Any?, _ rhs: Any?) -> Bool {
let cleanLhs = nilOrValue(lhs) as Any? let cleanLhs = nilOrValue(lhs) as Any?
let cleanRhs = nilOrValue(rhs) as Any? let cleanRhs = nilOrValue(rhs) as Any?
@@ -56,60 +69,93 @@ func deepEqualsNetwork(_ lhs: Any?, _ rhs: Any?) -> Bool {
case (nil, _), (_, nil): case (nil, _), (_, nil):
return false return false
case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs:
return true
case is (Void, Void): case is (Void, Void):
return true return true
case let (cleanLhsHashable, cleanRhsHashable) as (AnyHashable, AnyHashable): case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
return cleanLhsHashable == cleanRhsHashable guard lhsArray.count == rhsArray.count else { return false }
for (index, element) in lhsArray.enumerated() {
case let (cleanLhsArray, cleanRhsArray) as ([Any?], [Any?]): if !deepEqualsNetwork(element, rhsArray[index]) {
guard cleanLhsArray.count == cleanRhsArray.count else { return false }
for (index, element) in cleanLhsArray.enumerated() {
if !deepEqualsNetwork(element, cleanRhsArray[index]) {
return false return false
} }
} }
return true return true
case let (cleanLhsDictionary, cleanRhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): case (let lhsArray, let rhsArray) as ([Double], [Double]):
guard cleanLhsDictionary.count == cleanRhsDictionary.count else { return false } guard lhsArray.count == rhsArray.count else { return false }
for (key, cleanLhsValue) in cleanLhsDictionary { for (index, element) in lhsArray.enumerated() {
guard cleanRhsDictionary.index(forKey: key) != nil else { return false } if !doubleEqualsNetwork(element, rhsArray[index]) {
if !deepEqualsNetwork(cleanLhsValue, cleanRhsDictionary[key]!) {
return false return false
} }
} }
return true return true
case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]):
guard lhsDictionary.count == rhsDictionary.count else { return false }
for (lhsKey, lhsValue) in lhsDictionary {
var found = false
for (rhsKey, rhsValue) in rhsDictionary {
if deepEqualsNetwork(lhsKey, rhsKey) {
if deepEqualsNetwork(lhsValue, rhsValue) {
found = true
break
} else {
return false
}
}
}
if !found { return false }
}
return true
case (let lhs as Double, let rhs as Double):
return doubleEqualsNetwork(lhs, rhs)
case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable):
return lhsHashable == rhsHashable
default: default:
// Any other type shouldn't be able to be used with pigeon. File an issue if you find this to be untrue.
return false return false
} }
} }
func deepHashNetwork(value: Any?, hasher: inout Hasher) { func deepHashNetwork(value: Any?, hasher: inout Hasher) {
if let valueList = value as? [AnyHashable] { let cleanValue = nilOrValue(value) as Any?
for item in valueList { deepHashNetwork(value: item, hasher: &hasher) } if let cleanValue = cleanValue {
return if let doubleValue = cleanValue as? Double {
doubleHashNetwork(doubleValue, &hasher)
} else if let valueList = cleanValue as? [Any?] {
for item in valueList {
deepHashNetwork(value: item, hasher: &hasher)
} }
} else if let valueList = cleanValue as? [Double] {
if let valueDict = value as? [AnyHashable: AnyHashable] { for item in valueList {
for key in valueDict.keys { doubleHashNetwork(item, &hasher)
hasher.combine(key)
deepHashNetwork(value: valueDict[key]!, hasher: &hasher)
} }
return } else if let valueDict = cleanValue as? [AnyHashable: Any?] {
var result = 0
for (key, value) in valueDict {
var entryKeyHasher = Hasher()
deepHashNetwork(value: key, hasher: &entryKeyHasher)
var entryValueHasher = Hasher()
deepHashNetwork(value: value, hasher: &entryValueHasher)
result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize())
} }
hasher.combine(result)
if let hashableValue = value as? AnyHashable { } else if let hashableValue = cleanValue as? AnyHashable {
hasher.combine(hashableValue.hashValue) hasher.combine(hashableValue)
} else {
hasher.combine(String(describing: cleanValue))
}
} else {
hasher.combine(0)
} }
return hasher.combine(String(describing: value))
} }
/// Generated class from Pigeon that represents data sent in messages. /// Generated class from Pigeon that represents data sent in messages.
struct ClientCertData: Hashable { struct ClientCertData: Hashable {
var data: FlutterStandardTypedData var data: FlutterStandardTypedData
@@ -133,9 +179,16 @@ struct ClientCertData: Hashable {
] ]
} }
static func == (lhs: ClientCertData, rhs: ClientCertData) -> Bool { static func == (lhs: ClientCertData, rhs: ClientCertData) -> Bool {
return deepEqualsNetwork(lhs.toList(), rhs.toList()) } if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
return deepEqualsNetwork(lhs.data, rhs.data) && deepEqualsNetwork(lhs.password, rhs.password)
}
func hash(into hasher: inout Hasher) { func hash(into hasher: inout Hasher) {
deepHashNetwork(value: toList(), hasher: &hasher) hasher.combine("ClientCertData")
deepHashNetwork(value: data, hasher: &hasher)
deepHashNetwork(value: password, hasher: &hasher)
} }
} }
@@ -170,9 +223,18 @@ struct ClientCertPrompt: Hashable {
] ]
} }
static func == (lhs: ClientCertPrompt, rhs: ClientCertPrompt) -> Bool { static func == (lhs: ClientCertPrompt, rhs: ClientCertPrompt) -> Bool {
return deepEqualsNetwork(lhs.toList(), rhs.toList()) } if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
return deepEqualsNetwork(lhs.title, rhs.title) && deepEqualsNetwork(lhs.message, rhs.message) && deepEqualsNetwork(lhs.cancel, rhs.cancel) && deepEqualsNetwork(lhs.confirm, rhs.confirm)
}
func hash(into hasher: inout Hasher) { func hash(into hasher: inout Hasher) {
deepHashNetwork(value: toList(), hasher: &hasher) hasher.combine("ClientCertPrompt")
deepHashNetwork(value: title, hasher: &hasher)
deepHashNetwork(value: message, hasher: &hasher)
deepHashNetwork(value: cancel, hasher: &hasher)
deepHashNetwork(value: confirm, hasher: &hasher)
} }
} }
+2 -2
View File
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
import Foundation import Foundation
@@ -32,7 +32,7 @@ private func wrapError(_ error: Any) -> [Any?] {
} }
return [ return [
"\(error)", "\(error)",
"\(type(of: error))", "\(Swift.type(of: error))",
"Stacktrace: \(Thread.callStackSymbols)", "Stacktrace: \(Thread.callStackSymbols)",
] ]
} }
+2 -2
View File
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
import Foundation import Foundation
@@ -32,7 +32,7 @@ private func wrapError(_ error: Any) -> [Any?] {
} }
return [ return [
"\(error)", "\(error)",
"\(type(of: error))", "\(Swift.type(of: error))",
"Stacktrace: \(Thread.callStackSymbols)", "Stacktrace: \(Thread.callStackSymbols)",
] ]
} }
+140 -40
View File
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
import Foundation import Foundation
@@ -50,7 +50,7 @@ private func wrapError(_ error: Any) -> [Any?] {
} }
return [ return [
"\(error)", "\(error)",
"\(type(of: error))", "\(Swift.type(of: error))",
"Stacktrace: \(Thread.callStackSymbols)", "Stacktrace: \(Thread.callStackSymbols)",
] ]
} }
@@ -64,6 +64,19 @@ private func nilOrValue<T>(_ value: Any?) -> T? {
return value as! T? return value as! T?
} }
private func doubleEqualsMessages(_ lhs: Double, _ rhs: Double) -> Bool {
return (lhs.isNaN && rhs.isNaN) || lhs == rhs
}
private func doubleHashMessages(_ value: Double, _ hasher: inout Hasher) {
if value.isNaN {
hasher.combine(0x7FF8000000000000)
} else {
// Normalize -0.0 to 0.0
hasher.combine(value == 0 ? 0 : value)
}
}
func deepEqualsMessages(_ lhs: Any?, _ rhs: Any?) -> Bool { func deepEqualsMessages(_ lhs: Any?, _ rhs: Any?) -> Bool {
let cleanLhs = nilOrValue(lhs) as Any? let cleanLhs = nilOrValue(lhs) as Any?
let cleanRhs = nilOrValue(rhs) as Any? let cleanRhs = nilOrValue(rhs) as Any?
@@ -74,60 +87,93 @@ func deepEqualsMessages(_ lhs: Any?, _ rhs: Any?) -> Bool {
case (nil, _), (_, nil): case (nil, _), (_, nil):
return false return false
case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs:
return true
case is (Void, Void): case is (Void, Void):
return true return true
case let (cleanLhsHashable, cleanRhsHashable) as (AnyHashable, AnyHashable): case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
return cleanLhsHashable == cleanRhsHashable guard lhsArray.count == rhsArray.count else { return false }
for (index, element) in lhsArray.enumerated() {
case let (cleanLhsArray, cleanRhsArray) as ([Any?], [Any?]): if !deepEqualsMessages(element, rhsArray[index]) {
guard cleanLhsArray.count == cleanRhsArray.count else { return false }
for (index, element) in cleanLhsArray.enumerated() {
if !deepEqualsMessages(element, cleanRhsArray[index]) {
return false return false
} }
} }
return true return true
case let (cleanLhsDictionary, cleanRhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]): case (let lhsArray, let rhsArray) as ([Double], [Double]):
guard cleanLhsDictionary.count == cleanRhsDictionary.count else { return false } guard lhsArray.count == rhsArray.count else { return false }
for (key, cleanLhsValue) in cleanLhsDictionary { for (index, element) in lhsArray.enumerated() {
guard cleanRhsDictionary.index(forKey: key) != nil else { return false } if !doubleEqualsMessages(element, rhsArray[index]) {
if !deepEqualsMessages(cleanLhsValue, cleanRhsDictionary[key]!) {
return false return false
} }
} }
return true return true
case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]):
guard lhsDictionary.count == rhsDictionary.count else { return false }
for (lhsKey, lhsValue) in lhsDictionary {
var found = false
for (rhsKey, rhsValue) in rhsDictionary {
if deepEqualsMessages(lhsKey, rhsKey) {
if deepEqualsMessages(lhsValue, rhsValue) {
found = true
break
} else {
return false
}
}
}
if !found { return false }
}
return true
case (let lhs as Double, let rhs as Double):
return doubleEqualsMessages(lhs, rhs)
case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable):
return lhsHashable == rhsHashable
default: default:
// Any other type shouldn't be able to be used with pigeon. File an issue if you find this to be untrue.
return false return false
} }
} }
func deepHashMessages(value: Any?, hasher: inout Hasher) { func deepHashMessages(value: Any?, hasher: inout Hasher) {
if let valueList = value as? [AnyHashable] { let cleanValue = nilOrValue(value) as Any?
for item in valueList { deepHashMessages(value: item, hasher: &hasher) } if let cleanValue = cleanValue {
return if let doubleValue = cleanValue as? Double {
doubleHashMessages(doubleValue, &hasher)
} else if let valueList = cleanValue as? [Any?] {
for item in valueList {
deepHashMessages(value: item, hasher: &hasher)
} }
} else if let valueList = cleanValue as? [Double] {
if let valueDict = value as? [AnyHashable: AnyHashable] { for item in valueList {
for key in valueDict.keys { doubleHashMessages(item, &hasher)
hasher.combine(key)
deepHashMessages(value: valueDict[key]!, hasher: &hasher)
} }
return } else if let valueDict = cleanValue as? [AnyHashable: Any?] {
var result = 0
for (key, value) in valueDict {
var entryKeyHasher = Hasher()
deepHashMessages(value: key, hasher: &entryKeyHasher)
var entryValueHasher = Hasher()
deepHashMessages(value: value, hasher: &entryValueHasher)
result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize())
} }
hasher.combine(result)
if let hashableValue = value as? AnyHashable { } else if let hashableValue = cleanValue as? AnyHashable {
hasher.combine(hashableValue.hashValue) hasher.combine(hashableValue)
} else {
hasher.combine(String(describing: cleanValue))
}
} else {
hasher.combine(0)
} }
return hasher.combine(String(describing: value))
} }
enum PlatformAssetPlaybackStyle: Int { enum PlatformAssetPlaybackStyle: Int {
case unknown = 0 case unknown = 0
case image = 1 case image = 1
@@ -208,9 +254,28 @@ struct PlatformAsset: Hashable {
] ]
} }
static func == (lhs: PlatformAsset, rhs: PlatformAsset) -> Bool { static func == (lhs: PlatformAsset, rhs: PlatformAsset) -> Bool {
return deepEqualsMessages(lhs.toList(), rhs.toList()) } if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.type, rhs.type) && deepEqualsMessages(lhs.createdAt, rhs.createdAt) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.width, rhs.width) && deepEqualsMessages(lhs.height, rhs.height) && deepEqualsMessages(lhs.durationInSeconds, rhs.durationInSeconds) && deepEqualsMessages(lhs.orientation, rhs.orientation) && deepEqualsMessages(lhs.isFavorite, rhs.isFavorite) && deepEqualsMessages(lhs.adjustmentTime, rhs.adjustmentTime) && deepEqualsMessages(lhs.latitude, rhs.latitude) && deepEqualsMessages(lhs.longitude, rhs.longitude) && deepEqualsMessages(lhs.playbackStyle, rhs.playbackStyle)
}
func hash(into hasher: inout Hasher) { func hash(into hasher: inout Hasher) {
deepHashMessages(value: toList(), hasher: &hasher) hasher.combine("PlatformAsset")
deepHashMessages(value: id, hasher: &hasher)
deepHashMessages(value: name, hasher: &hasher)
deepHashMessages(value: type, hasher: &hasher)
deepHashMessages(value: createdAt, hasher: &hasher)
deepHashMessages(value: updatedAt, hasher: &hasher)
deepHashMessages(value: width, hasher: &hasher)
deepHashMessages(value: height, hasher: &hasher)
deepHashMessages(value: durationInSeconds, hasher: &hasher)
deepHashMessages(value: orientation, hasher: &hasher)
deepHashMessages(value: isFavorite, hasher: &hasher)
deepHashMessages(value: adjustmentTime, hasher: &hasher)
deepHashMessages(value: latitude, hasher: &hasher)
deepHashMessages(value: longitude, hasher: &hasher)
deepHashMessages(value: playbackStyle, hasher: &hasher)
} }
} }
@@ -249,9 +314,19 @@ struct PlatformAlbum: Hashable {
] ]
} }
static func == (lhs: PlatformAlbum, rhs: PlatformAlbum) -> Bool { static func == (lhs: PlatformAlbum, rhs: PlatformAlbum) -> Bool {
return deepEqualsMessages(lhs.toList(), rhs.toList()) } if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.isCloud, rhs.isCloud) && deepEqualsMessages(lhs.assetCount, rhs.assetCount)
}
func hash(into hasher: inout Hasher) { func hash(into hasher: inout Hasher) {
deepHashMessages(value: toList(), hasher: &hasher) hasher.combine("PlatformAlbum")
deepHashMessages(value: id, hasher: &hasher)
deepHashMessages(value: name, hasher: &hasher)
deepHashMessages(value: updatedAt, hasher: &hasher)
deepHashMessages(value: isCloud, hasher: &hasher)
deepHashMessages(value: assetCount, hasher: &hasher)
} }
} }
@@ -286,9 +361,18 @@ struct SyncDelta: Hashable {
] ]
} }
static func == (lhs: SyncDelta, rhs: SyncDelta) -> Bool { static func == (lhs: SyncDelta, rhs: SyncDelta) -> Bool {
return deepEqualsMessages(lhs.toList(), rhs.toList()) } if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
return deepEqualsMessages(lhs.hasChanges, rhs.hasChanges) && deepEqualsMessages(lhs.updates, rhs.updates) && deepEqualsMessages(lhs.deletes, rhs.deletes) && deepEqualsMessages(lhs.assetAlbums, rhs.assetAlbums)
}
func hash(into hasher: inout Hasher) { func hash(into hasher: inout Hasher) {
deepHashMessages(value: toList(), hasher: &hasher) hasher.combine("SyncDelta")
deepHashMessages(value: hasChanges, hasher: &hasher)
deepHashMessages(value: updates, hasher: &hasher)
deepHashMessages(value: deletes, hasher: &hasher)
deepHashMessages(value: assetAlbums, hasher: &hasher)
} }
} }
@@ -319,9 +403,17 @@ struct HashResult: Hashable {
] ]
} }
static func == (lhs: HashResult, rhs: HashResult) -> Bool { static func == (lhs: HashResult, rhs: HashResult) -> Bool {
return deepEqualsMessages(lhs.toList(), rhs.toList()) } if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
return deepEqualsMessages(lhs.assetId, rhs.assetId) && deepEqualsMessages(lhs.error, rhs.error) && deepEqualsMessages(lhs.hash, rhs.hash)
}
func hash(into hasher: inout Hasher) { func hash(into hasher: inout Hasher) {
deepHashMessages(value: toList(), hasher: &hasher) hasher.combine("HashResult")
deepHashMessages(value: assetId, hasher: &hasher)
deepHashMessages(value: error, hasher: &hasher)
deepHashMessages(value: hash, hasher: &hasher)
} }
} }
@@ -352,9 +444,17 @@ struct CloudIdResult: Hashable {
] ]
} }
static func == (lhs: CloudIdResult, rhs: CloudIdResult) -> Bool { static func == (lhs: CloudIdResult, rhs: CloudIdResult) -> Bool {
return deepEqualsMessages(lhs.toList(), rhs.toList()) } if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
return deepEqualsMessages(lhs.assetId, rhs.assetId) && deepEqualsMessages(lhs.error, rhs.error) && deepEqualsMessages(lhs.cloudId, rhs.cloudId)
}
func hash(into hasher: inout Hasher) { func hash(into hasher: inout Hasher) {
deepHashMessages(value: toList(), hasher: &hasher) hasher.combine("CloudIdResult")
deepHashMessages(value: assetId, hasher: &hasher)
deepHashMessages(value: error, hasher: &hasher)
deepHashMessages(value: cloudId, hasher: &hasher)
} }
} }
@@ -1,5 +1,3 @@
// ignore_for_file: experimental_member_use
import 'dart:async'; import 'dart:async';
import 'package:drift/drift.dart'; import 'package:drift/drift.dart';
@@ -3,7 +3,6 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/domain/models/user.model.dart'; import 'package:immich_mobile/domain/models/user.model.dart';
import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart';
import 'package:immich_mobile/presentation/widgets/people/partner_user_avatar.widget.dart'; import 'package:immich_mobile/presentation/widgets/people/partner_user_avatar.widget.dart';
import 'package:immich_mobile/providers/infrastructure/partner.provider.dart'; import 'package:immich_mobile/providers/infrastructure/partner.provider.dart';
+108 -112
View File
@@ -1,18 +1,29 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers // ignore_for_file: unused_import, unused_shown_name
// ignore_for_file: type=lint
import 'dart:async'; import 'dart:async';
import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'dart:typed_data' show Float64List, Int32List, Int64List;
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:meta/meta.dart' show immutable, protected, visibleForTesting;
PlatformException _createConnectionError(String channelName) { Object? _extractReplyValueOrThrow(List<Object?>? replyList, String channelName, {required bool isNullValid}) {
return PlatformException( if (replyList == null) {
throw PlatformException(
code: 'channel-error', code: 'channel-error',
message: 'Unable to establish connection on channel: "$channelName".', message: 'Unable to establish connection on channel: "$channelName".',
); );
} else if (replyList.length > 1) {
throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]);
} else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
}
return replyList.firstOrNull;
} }
List<Object?> wrapResponse({Object? result, PlatformException? error, bool empty = false}) { List<Object?> wrapResponse({Object? result, PlatformException? error, bool empty = false}) {
@@ -26,19 +37,65 @@ List<Object?> wrapResponse({Object? result, PlatformException? error, bool empty
} }
bool _deepEquals(Object? a, Object? b) { bool _deepEquals(Object? a, Object? b) {
if (identical(a, b)) {
return true;
}
if (a is double && b is double) {
if (a.isNaN && b.isNaN) {
return true;
}
return a == b;
}
if (a is List && b is List) { if (a is List && b is List) {
return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]));
} }
if (a is Map && b is Map) { if (a is Map && b is Map) {
return a.length == b.length && if (a.length != b.length) {
a.entries.every( return false;
(MapEntry<Object?, Object?> entry) => }
(b as Map<Object?, Object?>).containsKey(entry.key) && _deepEquals(entry.value, b[entry.key]), for (final MapEntry<Object?, Object?> entryA in a.entries) {
); bool found = false;
for (final MapEntry<Object?, Object?> entryB in b.entries) {
if (_deepEquals(entryA.key, entryB.key)) {
if (_deepEquals(entryA.value, entryB.value)) {
found = true;
break;
} else {
return false;
}
}
}
if (!found) {
return false;
}
}
return true;
} }
return a == b; return a == b;
} }
int _deepHash(Object? value) {
if (value is List) {
return Object.hashAll(value.map(_deepHash));
}
if (value is Map) {
int result = 0;
for (final MapEntry<Object?, Object?> entry in value.entries) {
result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value);
}
return result;
}
if (value is double && value.isNaN) {
// Normalize NaN to a consistent hash.
return 0x7FF8000000000000.hashCode;
}
if (value is double && value == 0.0) {
// Normalize -0.0 to 0.0 so they have the same hash code.
return 0.0.hashCode;
}
return value.hashCode;
}
class BackgroundWorkerSettings { class BackgroundWorkerSettings {
BackgroundWorkerSettings({required this.requiresCharging, required this.minimumDelaySeconds}); BackgroundWorkerSettings({required this.requiresCharging, required this.minimumDelaySeconds});
@@ -68,12 +125,13 @@ class BackgroundWorkerSettings {
if (identical(this, other)) { if (identical(this, other)) {
return true; return true;
} }
return _deepEquals(encode(), other.encode()); return _deepEquals(requiresCharging, other.requiresCharging) &&
_deepEquals(minimumDelaySeconds, other.minimumDelaySeconds);
} }
@override @override
// ignore: avoid_equals_and_hash_code_on_mutable_classes // ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hashAll(_toList()); int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
} }
class _PigeonCodec extends StandardMessageCodec { class _PigeonCodec extends StandardMessageCodec {
@@ -116,95 +174,59 @@ class BackgroundWorkerFgHostApi {
final String pigeonVar_messageChannelSuffix; final String pigeonVar_messageChannelSuffix;
Future<void> enable() async { Future<void> enable() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.enable$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.enable$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<void> saveNotificationMessage(String title, String body) async { Future<void> saveNotificationMessage(String title, String body) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.saveNotificationMessage$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.saveNotificationMessage$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[title, body]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[title, body]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<void> configure(BackgroundWorkerSettings settings) async { Future<void> configure(BackgroundWorkerSettings settings) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.configure$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.configure$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[settings]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[settings]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<void> disable() async { Future<void> disable() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.disable$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFgHostApi.disable$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
} }
@@ -222,49 +244,31 @@ class BackgroundWorkerBgHostApi {
final String pigeonVar_messageChannelSuffix; final String pigeonVar_messageChannelSuffix;
Future<void> onInitialized() async { Future<void> onInitialized() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.onInitialized$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.onInitialized$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<void> close() async { Future<void> close() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.close$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerBgHostApi.close$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
} }
@@ -284,7 +288,7 @@ abstract class BackgroundWorkerFlutterApi {
}) { }) {
messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
{ {
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload$messageChannelSuffix', 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload$messageChannelSuffix',
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: binaryMessenger, binaryMessenger: binaryMessenger,
@@ -293,19 +297,11 @@ abstract class BackgroundWorkerFlutterApi {
pigeonVar_channel.setMessageHandler(null); pigeonVar_channel.setMessageHandler(null);
} else { } else {
pigeonVar_channel.setMessageHandler((Object? message) async { pigeonVar_channel.setMessageHandler((Object? message) async {
assert( final List<Object?> args = message! as List<Object?>;
message != null, final bool arg_isRefresh = args[0]! as bool;
'Argument for dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload was null.', final int? arg_maxSeconds = args[1] as int?;
);
final List<Object?> args = (message as List<Object?>?)!;
final bool? arg_isRefresh = (args[0] as bool?);
assert(
arg_isRefresh != null,
'Argument for dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onIosUpload was null, expected non-null bool.',
);
final int? arg_maxSeconds = (args[1] as int?);
try { try {
await api.onIosUpload(arg_isRefresh!, arg_maxSeconds); await api.onIosUpload(arg_isRefresh, arg_maxSeconds);
return wrapResponse(empty: true); return wrapResponse(empty: true);
} on PlatformException catch (e) { } on PlatformException catch (e) {
return wrapResponse(error: e); return wrapResponse(error: e);
@@ -318,7 +314,7 @@ abstract class BackgroundWorkerFlutterApi {
} }
} }
{ {
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onAndroidUpload$messageChannelSuffix', 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.onAndroidUpload$messageChannelSuffix',
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: binaryMessenger, binaryMessenger: binaryMessenger,
@@ -341,7 +337,7 @@ abstract class BackgroundWorkerFlutterApi {
} }
} }
{ {
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.cancel$messageChannelSuffix', 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerFlutterApi.cancel$messageChannelSuffix',
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: binaryMessenger, binaryMessenger: binaryMessenger,
+27 -34
View File
@@ -1,18 +1,29 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers // ignore_for_file: unused_import, unused_shown_name
// ignore_for_file: type=lint
import 'dart:async'; import 'dart:async';
import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'dart:typed_data' show Float64List, Int32List, Int64List;
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:meta/meta.dart' show immutable, protected, visibleForTesting;
PlatformException _createConnectionError(String channelName) { Object? _extractReplyValueOrThrow(List<Object?>? replyList, String channelName, {required bool isNullValid}) {
return PlatformException( if (replyList == null) {
throw PlatformException(
code: 'channel-error', code: 'channel-error',
message: 'Unable to establish connection on channel: "$channelName".', message: 'Unable to establish connection on channel: "$channelName".',
); );
} else if (replyList.length > 1) {
throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]);
} else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
}
return replyList.firstOrNull;
} }
class _PigeonCodec extends StandardMessageCodec { class _PigeonCodec extends StandardMessageCodec {
@@ -50,48 +61,30 @@ class BackgroundWorkerLockApi {
final String pigeonVar_messageChannelSuffix; final String pigeonVar_messageChannelSuffix;
Future<void> lock() async { Future<void> lock() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.lock$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.lock$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<void> unlock() async { Future<void> unlock() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.unlock$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.BackgroundWorkerLockApi.unlock$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
} }
+27 -25
View File
@@ -1,18 +1,29 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers // ignore_for_file: unused_import, unused_shown_name
// ignore_for_file: type=lint
import 'dart:async'; import 'dart:async';
import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'dart:typed_data' show Float64List, Int32List, Int64List;
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:meta/meta.dart' show immutable, protected, visibleForTesting;
PlatformException _createConnectionError(String channelName) { Object? _extractReplyValueOrThrow(List<Object?>? replyList, String channelName, {required bool isNullValid}) {
return PlatformException( if (replyList == null) {
throw PlatformException(
code: 'channel-error', code: 'channel-error',
message: 'Unable to establish connection on channel: "$channelName".', message: 'Unable to establish connection on channel: "$channelName".',
); );
} else if (replyList.length > 1) {
throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]);
} else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
}
return replyList.firstOrNull;
} }
enum NetworkCapability { cellular, wifi, vpn, unmetered } enum NetworkCapability { cellular, wifi, vpn, unmetered }
@@ -36,7 +47,7 @@ class _PigeonCodec extends StandardMessageCodec {
Object? readValueOfType(int type, ReadBuffer buffer) { Object? readValueOfType(int type, ReadBuffer buffer) {
switch (type) { switch (type) {
case 129: case 129:
final int? value = readValue(buffer) as int?; final value = readValue(buffer) as int?;
return value == null ? null : NetworkCapability.values[value]; return value == null ? null : NetworkCapability.values[value];
default: default:
return super.readValueOfType(type, buffer); return super.readValueOfType(type, buffer);
@@ -58,30 +69,21 @@ class ConnectivityApi {
final String pigeonVar_messageChannelSuffix; final String pigeonVar_messageChannelSuffix;
Future<List<NetworkCapability>> getCapabilities() async { Future<List<NetworkCapability>> getCapabilities() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.ConnectivityApi.getCapabilities$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return (pigeonVar_replyValue! as List<Object?>).cast<NetworkCapability>();
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as List<Object?>?)!.cast<NetworkCapability>();
}
} }
} }
+40 -51
View File
@@ -1,18 +1,29 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers // ignore_for_file: unused_import, unused_shown_name
// ignore_for_file: type=lint
import 'dart:async'; import 'dart:async';
import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'dart:typed_data' show Float64List, Int32List, Int64List;
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:meta/meta.dart' show immutable, protected, visibleForTesting;
PlatformException _createConnectionError(String channelName) { Object? _extractReplyValueOrThrow(List<Object?>? replyList, String channelName, {required bool isNullValid}) {
return PlatformException( if (replyList == null) {
throw PlatformException(
code: 'channel-error', code: 'channel-error',
message: 'Unable to establish connection on channel: "$channelName".', message: 'Unable to establish connection on channel: "$channelName".',
); );
} else if (replyList.length > 1) {
throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]);
} else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
}
return replyList.firstOrNull;
} }
class _PigeonCodec extends StandardMessageCodec { class _PigeonCodec extends StandardMessageCodec {
@@ -57,9 +68,9 @@ class LocalImageApi {
required bool isVideo, required bool isVideo,
required bool preferEncoded, required bool preferEncoded,
}) async { }) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.LocalImageApi.requestImage$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.LocalImageApi.requestImage$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
@@ -72,68 +83,46 @@ class LocalImageApi {
isVideo, isVideo,
preferEncoded, preferEncoded,
]); ]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: true,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else { return (pigeonVar_replyValue as Map<Object?, Object?>?)?.cast<String, int>();
return (pigeonVar_replyList[0] as Map<Object?, Object?>?)?.cast<String, int>();
}
} }
Future<void> cancelRequest(int requestId) async { Future<void> cancelRequest(int requestId) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.LocalImageApi.cancelRequest$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.LocalImageApi.cancelRequest$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[requestId]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[requestId]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<Map<String, int>> getThumbhash(String thumbhash) async { Future<Map<String, int>> getThumbhash(String thumbhash) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.LocalImageApi.getThumbhash$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.LocalImageApi.getThumbhash$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[thumbhash]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[thumbhash]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return (pigeonVar_replyValue! as Map<Object?, Object?>).cast<String, int>();
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as Map<Object?, Object?>?)!.cast<String, int>();
}
} }
} }
+200 -229
View File
@@ -1,34 +1,91 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers // ignore_for_file: unused_import, unused_shown_name
// ignore_for_file: type=lint
import 'dart:async'; import 'dart:async';
import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'dart:typed_data' show Float64List, Int32List, Int64List;
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:meta/meta.dart' show immutable, protected, visibleForTesting;
PlatformException _createConnectionError(String channelName) { Object? _extractReplyValueOrThrow(List<Object?>? replyList, String channelName, {required bool isNullValid}) {
return PlatformException( if (replyList == null) {
throw PlatformException(
code: 'channel-error', code: 'channel-error',
message: 'Unable to establish connection on channel: "$channelName".', message: 'Unable to establish connection on channel: "$channelName".',
); );
} else if (replyList.length > 1) {
throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]);
} else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
}
return replyList.firstOrNull;
} }
bool _deepEquals(Object? a, Object? b) { bool _deepEquals(Object? a, Object? b) {
if (identical(a, b)) {
return true;
}
if (a is double && b is double) {
if (a.isNaN && b.isNaN) {
return true;
}
return a == b;
}
if (a is List && b is List) { if (a is List && b is List) {
return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]));
} }
if (a is Map && b is Map) { if (a is Map && b is Map) {
return a.length == b.length && if (a.length != b.length) {
a.entries.every( return false;
(MapEntry<Object?, Object?> entry) => }
(b as Map<Object?, Object?>).containsKey(entry.key) && _deepEquals(entry.value, b[entry.key]), for (final MapEntry<Object?, Object?> entryA in a.entries) {
); bool found = false;
for (final MapEntry<Object?, Object?> entryB in b.entries) {
if (_deepEquals(entryA.key, entryB.key)) {
if (_deepEquals(entryA.value, entryB.value)) {
found = true;
break;
} else {
return false;
}
}
}
if (!found) {
return false;
}
}
return true;
} }
return a == b; return a == b;
} }
int _deepHash(Object? value) {
if (value is List) {
return Object.hashAll(value.map(_deepHash));
}
if (value is Map) {
int result = 0;
for (final MapEntry<Object?, Object?> entry in value.entries) {
result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value);
}
return result;
}
if (value is double && value.isNaN) {
// Normalize NaN to a consistent hash.
return 0x7FF8000000000000.hashCode;
}
if (value is double && value == 0.0) {
// Normalize -0.0 to 0.0 so they have the same hash code.
return 0.0.hashCode;
}
return value.hashCode;
}
enum PlatformAssetPlaybackStyle { unknown, image, video, imageAnimated, livePhoto, videoLooping } enum PlatformAssetPlaybackStyle { unknown, image, video, imageAnimated, livePhoto, videoLooping }
class PlatformAsset { class PlatformAsset {
@@ -129,12 +186,25 @@ class PlatformAsset {
if (identical(this, other)) { if (identical(this, other)) {
return true; return true;
} }
return _deepEquals(encode(), other.encode()); return _deepEquals(id, other.id) &&
_deepEquals(name, other.name) &&
_deepEquals(type, other.type) &&
_deepEquals(createdAt, other.createdAt) &&
_deepEquals(updatedAt, other.updatedAt) &&
_deepEquals(width, other.width) &&
_deepEquals(height, other.height) &&
_deepEquals(durationInSeconds, other.durationInSeconds) &&
_deepEquals(orientation, other.orientation) &&
_deepEquals(isFavorite, other.isFavorite) &&
_deepEquals(adjustmentTime, other.adjustmentTime) &&
_deepEquals(latitude, other.latitude) &&
_deepEquals(longitude, other.longitude) &&
_deepEquals(playbackStyle, other.playbackStyle);
} }
@override @override
// ignore: avoid_equals_and_hash_code_on_mutable_classes // ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hashAll(_toList()); int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
} }
class PlatformAlbum { class PlatformAlbum {
@@ -184,12 +254,16 @@ class PlatformAlbum {
if (identical(this, other)) { if (identical(this, other)) {
return true; return true;
} }
return _deepEquals(encode(), other.encode()); return _deepEquals(id, other.id) &&
_deepEquals(name, other.name) &&
_deepEquals(updatedAt, other.updatedAt) &&
_deepEquals(isCloud, other.isCloud) &&
_deepEquals(assetCount, other.assetCount);
} }
@override @override
// ignore: avoid_equals_and_hash_code_on_mutable_classes // ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hashAll(_toList()); int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
} }
class SyncDelta { class SyncDelta {
@@ -215,9 +289,9 @@ class SyncDelta {
result as List<Object?>; result as List<Object?>;
return SyncDelta( return SyncDelta(
hasChanges: result[0]! as bool, hasChanges: result[0]! as bool,
updates: (result[1] as List<Object?>?)!.cast<PlatformAsset>(), updates: (result[1]! as List<Object?>).cast<PlatformAsset>(),
deletes: (result[2] as List<Object?>?)!.cast<String>(), deletes: (result[2]! as List<Object?>).cast<String>(),
assetAlbums: (result[3] as Map<Object?, Object?>?)!.cast<String, List<String>>(), assetAlbums: (result[3]! as Map<Object?, Object?>).cast<String, List<String>>(),
); );
} }
@@ -230,12 +304,15 @@ class SyncDelta {
if (identical(this, other)) { if (identical(this, other)) {
return true; return true;
} }
return _deepEquals(encode(), other.encode()); return _deepEquals(hasChanges, other.hasChanges) &&
_deepEquals(updates, other.updates) &&
_deepEquals(deletes, other.deletes) &&
_deepEquals(assetAlbums, other.assetAlbums);
} }
@override @override
// ignore: avoid_equals_and_hash_code_on_mutable_classes // ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hashAll(_toList()); int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
} }
class HashResult { class HashResult {
@@ -269,12 +346,12 @@ class HashResult {
if (identical(this, other)) { if (identical(this, other)) {
return true; return true;
} }
return _deepEquals(encode(), other.encode()); return _deepEquals(assetId, other.assetId) && _deepEquals(error, other.error) && _deepEquals(hash, other.hash);
} }
@override @override
// ignore: avoid_equals_and_hash_code_on_mutable_classes // ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hashAll(_toList()); int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
} }
class CloudIdResult { class CloudIdResult {
@@ -308,12 +385,14 @@ class CloudIdResult {
if (identical(this, other)) { if (identical(this, other)) {
return true; return true;
} }
return _deepEquals(encode(), other.encode()); return _deepEquals(assetId, other.assetId) &&
_deepEquals(error, other.error) &&
_deepEquals(cloudId, other.cloudId);
} }
@override @override
// ignore: avoid_equals_and_hash_code_on_mutable_classes // ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hashAll(_toList()); int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
} }
class _PigeonCodec extends StandardMessageCodec { class _PigeonCodec extends StandardMessageCodec {
@@ -350,7 +429,7 @@ class _PigeonCodec extends StandardMessageCodec {
Object? readValueOfType(int type, ReadBuffer buffer) { Object? readValueOfType(int type, ReadBuffer buffer) {
switch (type) { switch (type) {
case 129: case 129:
final int? value = readValue(buffer) as int?; final value = readValue(buffer) as int?;
return value == null ? null : PlatformAssetPlaybackStyle.values[value]; return value == null ? null : PlatformAssetPlaybackStyle.values[value];
case 130: case 130:
return PlatformAsset.decode(readValue(buffer)!); return PlatformAsset.decode(readValue(buffer)!);
@@ -382,323 +461,215 @@ class NativeSyncApi {
final String pigeonVar_messageChannelSuffix; final String pigeonVar_messageChannelSuffix;
Future<bool> shouldFullSync() async { Future<bool> shouldFullSync() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.shouldFullSync$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.shouldFullSync$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return pigeonVar_replyValue! as bool;
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as bool?)!;
}
} }
Future<SyncDelta> getMediaChanges() async { Future<SyncDelta> getMediaChanges() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getMediaChanges$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getMediaChanges$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return pigeonVar_replyValue! as SyncDelta;
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as SyncDelta?)!;
}
} }
Future<void> checkpointSync() async { Future<void> checkpointSync() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.checkpointSync$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.checkpointSync$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<void> clearSyncCheckpoint() async { Future<void> clearSyncCheckpoint() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.clearSyncCheckpoint$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.clearSyncCheckpoint$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<List<String>> getAssetIdsForAlbum(String albumId) async { Future<List<String>> getAssetIdsForAlbum(String albumId) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetIdsForAlbum$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetIdsForAlbum$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[albumId]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[albumId]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return (pigeonVar_replyValue! as List<Object?>).cast<String>();
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as List<Object?>?)!.cast<String>();
}
} }
Future<List<PlatformAlbum>> getAlbums() async { Future<List<PlatformAlbum>> getAlbums() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAlbums$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAlbums$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return (pigeonVar_replyValue! as List<Object?>).cast<PlatformAlbum>();
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as List<Object?>?)!.cast<PlatformAlbum>();
}
} }
Future<int> getAssetsCountSince(String albumId, int timestamp) async { Future<int> getAssetsCountSince(String albumId, int timestamp) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[albumId, timestamp]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[albumId, timestamp]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return pigeonVar_replyValue! as int;
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as int?)!;
}
} }
Future<List<PlatformAsset>> getAssetsForAlbum(String albumId, {int? updatedTimeCond}) async { Future<List<PlatformAsset>> getAssetsForAlbum(String albumId, {int? updatedTimeCond}) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsForAlbum$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsForAlbum$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[albumId, updatedTimeCond]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[albumId, updatedTimeCond]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return (pigeonVar_replyValue! as List<Object?>).cast<PlatformAsset>();
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as List<Object?>?)!.cast<PlatformAsset>();
}
} }
Future<List<HashResult>> hashAssets(List<String> assetIds, {bool allowNetworkAccess = false}) async { Future<List<HashResult>> hashAssets(List<String> assetIds, {bool allowNetworkAccess = false}) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.hashAssets$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[assetIds, allowNetworkAccess]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[assetIds, allowNetworkAccess]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return (pigeonVar_replyValue! as List<Object?>).cast<HashResult>();
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as List<Object?>?)!.cast<HashResult>();
}
} }
Future<void> cancelHashing() async { Future<void> cancelHashing() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelHashing$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.cancelHashing$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<Map<String, List<PlatformAsset>>> getTrashedAssets() async { Future<Map<String, List<PlatformAsset>>> getTrashedAssets() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return (pigeonVar_replyValue! as Map<Object?, Object?>).cast<String, List<PlatformAsset>>();
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as Map<Object?, Object?>?)!.cast<String, List<PlatformAsset>>();
}
} }
Future<List<CloudIdResult>> getCloudIdForAssetIds(List<String> assetIds) async { Future<List<CloudIdResult>> getCloudIdForAssetIds(List<String> assetIds) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getCloudIdForAssetIds$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[assetIds]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[assetIds]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return (pigeonVar_replyValue! as List<Object?>).cast<CloudIdResult>();
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as List<Object?>?)!.cast<CloudIdResult>();
}
} }
} }
+113 -107
View File
@@ -1,34 +1,91 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers // ignore_for_file: unused_import, unused_shown_name
// ignore_for_file: type=lint
import 'dart:async'; import 'dart:async';
import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'dart:typed_data' show Float64List, Int32List, Int64List;
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:meta/meta.dart' show immutable, protected, visibleForTesting;
PlatformException _createConnectionError(String channelName) { Object? _extractReplyValueOrThrow(List<Object?>? replyList, String channelName, {required bool isNullValid}) {
return PlatformException( if (replyList == null) {
throw PlatformException(
code: 'channel-error', code: 'channel-error',
message: 'Unable to establish connection on channel: "$channelName".', message: 'Unable to establish connection on channel: "$channelName".',
); );
} else if (replyList.length > 1) {
throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]);
} else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
}
return replyList.firstOrNull;
} }
bool _deepEquals(Object? a, Object? b) { bool _deepEquals(Object? a, Object? b) {
if (identical(a, b)) {
return true;
}
if (a is double && b is double) {
if (a.isNaN && b.isNaN) {
return true;
}
return a == b;
}
if (a is List && b is List) { if (a is List && b is List) {
return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); return a.length == b.length && a.indexed.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]));
} }
if (a is Map && b is Map) { if (a is Map && b is Map) {
return a.length == b.length && if (a.length != b.length) {
a.entries.every( return false;
(MapEntry<Object?, Object?> entry) => }
(b as Map<Object?, Object?>).containsKey(entry.key) && _deepEquals(entry.value, b[entry.key]), for (final MapEntry<Object?, Object?> entryA in a.entries) {
); bool found = false;
for (final MapEntry<Object?, Object?> entryB in b.entries) {
if (_deepEquals(entryA.key, entryB.key)) {
if (_deepEquals(entryA.value, entryB.value)) {
found = true;
break;
} else {
return false;
}
}
}
if (!found) {
return false;
}
}
return true;
} }
return a == b; return a == b;
} }
int _deepHash(Object? value) {
if (value is List) {
return Object.hashAll(value.map(_deepHash));
}
if (value is Map) {
int result = 0;
for (final MapEntry<Object?, Object?> entry in value.entries) {
result += (_deepHash(entry.key) * 31) ^ _deepHash(entry.value);
}
return result;
}
if (value is double && value.isNaN) {
// Normalize NaN to a consistent hash.
return 0x7FF8000000000000.hashCode;
}
if (value is double && value == 0.0) {
// Normalize -0.0 to 0.0 so they have the same hash code.
return 0.0.hashCode;
}
return value.hashCode;
}
class ClientCertData { class ClientCertData {
ClientCertData({required this.data, required this.password}); ClientCertData({required this.data, required this.password});
@@ -58,12 +115,12 @@ class ClientCertData {
if (identical(this, other)) { if (identical(this, other)) {
return true; return true;
} }
return _deepEquals(encode(), other.encode()); return _deepEquals(data, other.data) && _deepEquals(password, other.password);
} }
@override @override
// ignore: avoid_equals_and_hash_code_on_mutable_classes // ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hashAll(_toList()); int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
} }
class ClientCertPrompt { class ClientCertPrompt {
@@ -104,12 +161,15 @@ class ClientCertPrompt {
if (identical(this, other)) { if (identical(this, other)) {
return true; return true;
} }
return _deepEquals(encode(), other.encode()); return _deepEquals(title, other.title) &&
_deepEquals(message, other.message) &&
_deepEquals(cancel, other.cancel) &&
_deepEquals(confirm, other.confirm);
} }
@override @override
// ignore: avoid_equals_and_hash_code_on_mutable_classes // ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => Object.hashAll(_toList()); int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
} }
class _PigeonCodec extends StandardMessageCodec { class _PigeonCodec extends StandardMessageCodec {
@@ -157,150 +217,96 @@ class NetworkApi {
final String pigeonVar_messageChannelSuffix; final String pigeonVar_messageChannelSuffix;
Future<void> addCertificate(ClientCertData clientData) async { Future<void> addCertificate(ClientCertData clientData) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NetworkApi.addCertificate$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NetworkApi.addCertificate$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[clientData]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[clientData]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<void> selectCertificate(ClientCertPrompt promptText) async { Future<void> selectCertificate(ClientCertPrompt promptText) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NetworkApi.selectCertificate$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NetworkApi.selectCertificate$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[promptText]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[promptText]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<void> removeCertificate() async { Future<void> removeCertificate() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NetworkApi.removeCertificate$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NetworkApi.removeCertificate$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<bool> hasCertificate() async { Future<bool> hasCertificate() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NetworkApi.hasCertificate$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NetworkApi.hasCertificate$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return pigeonVar_replyValue! as bool;
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as bool?)!;
}
} }
Future<int> getClientPointer() async { Future<int> getClientPointer() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NetworkApi.getClientPointer$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NetworkApi.getClientPointer$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return pigeonVar_replyValue! as int;
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as int?)!;
}
} }
Future<void> setRequestHeaders(Map<String, String> headers, List<String> serverUrls, String? token) async { Future<void> setRequestHeaders(Map<String, String> headers, List<String> serverUrls, String? token) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.NetworkApi.setRequestHeaders$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.NetworkApi.setRequestHeaders$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[headers, serverUrls, token]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[headers, serverUrls, token]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
} }
+40 -51
View File
@@ -1,18 +1,29 @@
// Autogenerated from Pigeon (v26.0.2), do not edit directly. // Autogenerated from Pigeon (v26.3.4), do not edit directly.
// See also: https://pub.dev/packages/pigeon // See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers // ignore_for_file: unused_import, unused_shown_name
// ignore_for_file: type=lint
import 'dart:async'; import 'dart:async';
import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'dart:typed_data' show Float64List, Int32List, Int64List;
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:meta/meta.dart' show immutable, protected, visibleForTesting;
PlatformException _createConnectionError(String channelName) { Object? _extractReplyValueOrThrow(List<Object?>? replyList, String channelName, {required bool isNullValid}) {
return PlatformException( if (replyList == null) {
throw PlatformException(
code: 'channel-error', code: 'channel-error',
message: 'Unable to establish connection on channel: "$channelName".', message: 'Unable to establish connection on channel: "$channelName".',
); );
} else if (replyList.length > 1) {
throw PlatformException(code: replyList[0]! as String, message: replyList[1] as String?, details: replyList[2]);
} else if (!isNullValid && (replyList.isNotEmpty && replyList[0] == null)) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
}
return replyList.firstOrNull;
} }
class _PigeonCodec extends StandardMessageCodec { class _PigeonCodec extends StandardMessageCodec {
@@ -50,76 +61,54 @@ class RemoteImageApi {
final String pigeonVar_messageChannelSuffix; final String pigeonVar_messageChannelSuffix;
Future<Map<String, int>?> requestImage(String url, {required int requestId, required bool preferEncoded}) async { Future<Map<String, int>?> requestImage(String url, {required int requestId, required bool preferEncoded}) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.RemoteImageApi.requestImage$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.requestImage$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[url, requestId, preferEncoded]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[url, requestId, preferEncoded]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: true,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else { return (pigeonVar_replyValue as Map<Object?, Object?>?)?.cast<String, int>();
return (pigeonVar_replyList[0] as Map<Object?, Object?>?)?.cast<String, int>();
}
} }
Future<void> cancelRequest(int requestId) async { Future<void> cancelRequest(int requestId) async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.RemoteImageApi.cancelRequest$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.cancelRequest$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[requestId]); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[requestId]);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else {
return;
}
} }
Future<int> clearCache() async { Future<int> clearCache() async {
final String pigeonVar_channelName = final pigeonVar_channelName =
'dev.flutter.pigeon.immich_mobile.RemoteImageApi.clearCache$pigeonVar_messageChannelSuffix'; 'dev.flutter.pigeon.immich_mobile.RemoteImageApi.clearCache$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName, pigeonVar_channelName,
pigeonChannelCodec, pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger, binaryMessenger: pigeonVar_binaryMessenger,
); );
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null); final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(null);
final List<Object?>? pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?; final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName); final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
} else if (pigeonVar_replyList.length > 1) { pigeonVar_replyList,
throw PlatformException( pigeonVar_channelName,
code: pigeonVar_replyList[0]! as String, isNullValid: false,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
); );
} else if (pigeonVar_replyList[0] == null) { return pigeonVar_replyValue! as int;
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as int?)!;
}
} }
} }
@@ -34,7 +34,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget {
final isOwner = album.ownerId == userId; final isOwner = album.ownerId == userId;
void showErrorMessage() { void showErrorMessage() {
context.pop(); ContextHelper(context).pop();
ImmichToast.show( ImmichToast.show(
context: context, context: context,
msg: "shared_album_section_people_action_error".t(context: context), msg: "shared_album_section_people_action_error".t(context: context),
@@ -60,7 +60,7 @@ class DriftAlbumOptionsPage extends HookConsumerWidget {
showErrorMessage(); showErrorMessage();
} }
context.pop(); ContextHelper(context).pop();
} }
Future<void> addUsers() async { Future<void> addUsers() async {
@@ -33,7 +33,7 @@ class DriftMapPage extends StatelessWidget {
top: 70, top: 70,
child: IconButton.filled( child: IconButton.filled(
color: Colors.white, color: Colors.white,
onPressed: () => context.pop(), onPressed: () => ContextHelper(context).pop(),
icon: const Icon(Icons.arrow_back_ios_new_rounded), icon: const Icon(Icons.arrow_back_ios_new_rounded),
style: IconButton.styleFrom( style: IconButton.styleFrom(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
@@ -58,11 +58,11 @@ class _DriftPersonPageState extends ConsumerState<DriftPersonPage> {
return PersonOptionSheet( return PersonOptionSheet(
onEditName: () async { onEditName: () async {
await handleEditName(context); await handleEditName(context);
context.pop(); ContextHelper(context).pop();
}, },
onEditBirthday: () async { onEditBirthday: () async {
await handleEditBirthday(context); await handleEditBirthday(context);
context.pop(); ContextHelper(context).pop();
}, },
birthdayExists: _person.birthDate != null, birthdayExists: _person.birthDate != null,
); );
@@ -340,11 +340,11 @@ class DriftSearchPage extends HookConsumerWidget {
child: QuickDatePicker( child: QuickDatePicker(
currentInput: dateInputFilter.value, currentInput: dateInputFilter.value,
onRequestPicker: () { onRequestPicker: () {
context.pop(); ContextHelper(context).pop();
showDatePicker(); showDatePicker();
}, },
onSelect: (date) { onSelect: (date) {
context.pop(); ContextHelper(context).pop();
datePicked(date); datePicked(date);
}, },
), ),
@@ -833,7 +833,7 @@ class CreateAlbumButton extends ConsumerWidget {
// Invalidate using the asset's remote ID to refresh the "Appears in" list // Invalidate using the asset's remote ID to refresh the "Appears in" list
ref.invalidate(albumsContainingAssetProvider(asset.remoteId!)); ref.invalidate(albumsContainingAssetProvider(asset.remoteId!));
context.pop(); ContextHelper(context).pop();
} }
return SliverPadding( return SliverPadding(
@@ -6,10 +6,10 @@ import 'package:immich_mobile/domain/models/person.model.dart';
import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/extensions/theme_extensions.dart'; import 'package:immich_mobile/extensions/theme_extensions.dart';
import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart';
import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart';
import 'package:immich_mobile/presentation/widgets/people/person_edit_name_modal.widget.dart'; import 'package:immich_mobile/presentation/widgets/people/person_edit_name_modal.widget.dart';
import 'package:immich_mobile/providers/infrastructure/people.provider.dart'; import 'package:immich_mobile/providers/infrastructure/people.provider.dart';
import 'package:immich_mobile/providers/routes.provider.dart'; import 'package:immich_mobile/providers/routes.provider.dart';
import 'package:immich_mobile/presentation/widgets/images/remote_image_provider.dart';
import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/routing/router.dart';
import 'package:immich_mobile/utils/image_url_builder.dart'; import 'package:immich_mobile/utils/image_url_builder.dart';
import 'package:immich_mobile/utils/people.utils.dart'; import 'package:immich_mobile/utils/people.utils.dart';
@@ -73,7 +73,7 @@ class PeopleDetails extends ConsumerWidget {
context.back(); context.back();
return; return;
} }
context.pop(); ContextHelper(context).pop();
context.pushRoute(DriftPersonRoute(person: person)); context.pushRoute(DriftPersonRoute(person: person));
}, },
onNameTap: () => showNameEditModal(person), onNameTap: () => showNameEditModal(person),
+1
View File
@@ -1,4 +1,5 @@
import 'package:auto_route/auto_route.dart'; import 'package:auto_route/auto_route.dart';
import 'package:collection/collection.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/domain/models/album/album.model.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart';
+278
View File
@@ -45,6 +45,16 @@ class AppLogDetailRouteArgs {
String toString() { String toString() {
return 'AppLogDetailRouteArgs{key: $key, logMessage: $logMessage}'; return 'AppLogDetailRouteArgs{key: $key, logMessage: $logMessage}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! AppLogDetailRouteArgs) return false;
return key == other.key && logMessage == other.logMessage;
}
@override
int get hashCode => key.hashCode ^ logMessage.hashCode;
} }
/// generated route for /// generated route for
@@ -98,6 +108,16 @@ class AssetTroubleshootRouteArgs {
String toString() { String toString() {
return 'AssetTroubleshootRouteArgs{key: $key, asset: $asset}'; return 'AssetTroubleshootRouteArgs{key: $key, asset: $asset}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! AssetTroubleshootRouteArgs) return false;
return key == other.key && asset == other.asset;
}
@override
int get hashCode => key.hashCode ^ asset.hashCode;
} }
/// generated route for /// generated route for
@@ -162,6 +182,25 @@ class AssetViewerRouteArgs {
String toString() { String toString() {
return 'AssetViewerRouteArgs{key: $key, initialIndex: $initialIndex, timelineService: $timelineService, heroOffset: $heroOffset, currentAlbum: $currentAlbum}'; return 'AssetViewerRouteArgs{key: $key, initialIndex: $initialIndex, timelineService: $timelineService, heroOffset: $heroOffset, currentAlbum: $currentAlbum}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! AssetViewerRouteArgs) return false;
return key == other.key &&
initialIndex == other.initialIndex &&
timelineService == other.timelineService &&
heroOffset == other.heroOffset &&
currentAlbum == other.currentAlbum;
}
@override
int get hashCode =>
key.hashCode ^
initialIndex.hashCode ^
timelineService.hashCode ^
heroOffset.hashCode ^
currentAlbum.hashCode;
} }
/// generated route for /// generated route for
@@ -215,6 +254,18 @@ class CleanupPreviewRouteArgs {
String toString() { String toString() {
return 'CleanupPreviewRouteArgs{key: $key, assets: $assets}'; return 'CleanupPreviewRouteArgs{key: $key, assets: $assets}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! CleanupPreviewRouteArgs) return false;
return key == other.key &&
const ListEquality<LocalAsset>().equals(assets, other.assets);
}
@override
int get hashCode =>
key.hashCode ^ const ListEquality<LocalAsset>().hash(assets);
} }
/// generated route for /// generated route for
@@ -289,6 +340,20 @@ class DriftActivitiesRouteArgs {
String toString() { String toString() {
return 'DriftActivitiesRouteArgs{key: $key, album: $album, assetId: $assetId, assetName: $assetName}'; return 'DriftActivitiesRouteArgs{key: $key, album: $album, assetId: $assetId, assetName: $assetName}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftActivitiesRouteArgs) return false;
return key == other.key &&
album == other.album &&
assetId == other.assetId &&
assetName == other.assetName;
}
@override
int get hashCode =>
key.hashCode ^ album.hashCode ^ assetId.hashCode ^ assetName.hashCode;
} }
/// generated route for /// generated route for
@@ -326,6 +391,16 @@ class DriftAlbumOptionsRouteArgs {
String toString() { String toString() {
return 'DriftAlbumOptionsRouteArgs{key: $key, album: $album}'; return 'DriftAlbumOptionsRouteArgs{key: $key, album: $album}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftAlbumOptionsRouteArgs) return false;
return key == other.key && album == other.album;
}
@override
int get hashCode => key.hashCode ^ album.hashCode;
} }
/// generated route for /// generated route for
@@ -407,6 +482,21 @@ class DriftAssetSelectionTimelineRouteArgs {
String toString() { String toString() {
return 'DriftAssetSelectionTimelineRouteArgs{key: $key, lockedSelectionAssets: $lockedSelectionAssets}'; return 'DriftAssetSelectionTimelineRouteArgs{key: $key, lockedSelectionAssets: $lockedSelectionAssets}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftAssetSelectionTimelineRouteArgs) return false;
return key == other.key &&
const SetEquality<BaseAsset>().equals(
lockedSelectionAssets,
other.lockedSelectionAssets,
);
}
@override
int get hashCode =>
key.hashCode ^ const SetEquality<BaseAsset>().hash(lockedSelectionAssets);
} }
/// generated route for /// generated route for
@@ -539,6 +629,16 @@ class DriftEditImageRouteArgs {
String toString() { String toString() {
return 'DriftEditImageRouteArgs{key: $key, image: $image, applyEdits: $applyEdits}'; return 'DriftEditImageRouteArgs{key: $key, image: $image, applyEdits: $applyEdits}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftEditImageRouteArgs) return false;
return key == other.key && image == other.image;
}
@override
int get hashCode => key.hashCode ^ image.hashCode;
} }
/// generated route for /// generated route for
@@ -642,6 +742,16 @@ class DriftMapRouteArgs {
String toString() { String toString() {
return 'DriftMapRouteArgs{key: $key, initialLocation: $initialLocation}'; return 'DriftMapRouteArgs{key: $key, initialLocation: $initialLocation}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftMapRouteArgs) return false;
return key == other.key && initialLocation == other.initialLocation;
}
@override
int get hashCode => key.hashCode ^ initialLocation.hashCode;
} }
/// generated route for /// generated route for
@@ -694,6 +804,21 @@ class DriftMemoryRouteArgs {
String toString() { String toString() {
return 'DriftMemoryRouteArgs{memories: $memories, memoryIndex: $memoryIndex, key: $key}'; return 'DriftMemoryRouteArgs{memories: $memories, memoryIndex: $memoryIndex, key: $key}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftMemoryRouteArgs) return false;
return const ListEquality<DriftMemory>().equals(memories, other.memories) &&
memoryIndex == other.memoryIndex &&
key == other.key;
}
@override
int get hashCode =>
const ListEquality<DriftMemory>().hash(memories) ^
memoryIndex.hashCode ^
key.hashCode;
} }
/// generated route for /// generated route for
@@ -732,6 +857,16 @@ class DriftPartnerDetailRouteArgs {
String toString() { String toString() {
return 'DriftPartnerDetailRouteArgs{key: $key, partner: $partner}'; return 'DriftPartnerDetailRouteArgs{key: $key, partner: $partner}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftPartnerDetailRouteArgs) return false;
return key == other.key && partner == other.partner;
}
@override
int get hashCode => key.hashCode ^ partner.hashCode;
} }
/// generated route for /// generated route for
@@ -801,6 +936,16 @@ class DriftPersonRouteArgs {
String toString() { String toString() {
return 'DriftPersonRouteArgs{key: $key, person: $person}'; return 'DriftPersonRouteArgs{key: $key, person: $person}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftPersonRouteArgs) return false;
return key == other.key && person == other.person;
}
@override
int get hashCode => key.hashCode ^ person.hashCode;
} }
/// generated route for /// generated route for
@@ -838,6 +983,16 @@ class DriftPlaceDetailRouteArgs {
String toString() { String toString() {
return 'DriftPlaceDetailRouteArgs{key: $key, place: $place}'; return 'DriftPlaceDetailRouteArgs{key: $key, place: $place}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftPlaceDetailRouteArgs) return false;
return key == other.key && place == other.place;
}
@override
int get hashCode => key.hashCode ^ place.hashCode;
} }
/// generated route for /// generated route for
@@ -880,6 +1035,16 @@ class DriftPlaceRouteArgs {
String toString() { String toString() {
return 'DriftPlaceRouteArgs{key: $key, currentLocation: $currentLocation}'; return 'DriftPlaceRouteArgs{key: $key, currentLocation: $currentLocation}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftPlaceRouteArgs) return false;
return key == other.key && currentLocation == other.currentLocation;
}
@override
int get hashCode => key.hashCode ^ currentLocation.hashCode;
} }
/// generated route for /// generated route for
@@ -982,6 +1147,16 @@ class DriftUserSelectionRouteArgs {
String toString() { String toString() {
return 'DriftUserSelectionRouteArgs{key: $key, album: $album}'; return 'DriftUserSelectionRouteArgs{key: $key, album: $album}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! DriftUserSelectionRouteArgs) return false;
return key == other.key && album == other.album;
}
@override
int get hashCode => key.hashCode ^ album.hashCode;
} }
/// generated route for /// generated route for
@@ -1037,6 +1212,16 @@ class FolderRouteArgs {
String toString() { String toString() {
return 'FolderRouteArgs{key: $key, folder: $folder}'; return 'FolderRouteArgs{key: $key, folder: $folder}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! FolderRouteArgs) return false;
return key == other.key && folder == other.folder;
}
@override
int get hashCode => key.hashCode ^ folder.hashCode;
} }
/// generated route for /// generated route for
@@ -1106,6 +1291,16 @@ class LocalTimelineRouteArgs {
String toString() { String toString() {
return 'LocalTimelineRouteArgs{key: $key, album: $album}'; return 'LocalTimelineRouteArgs{key: $key, album: $album}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! LocalTimelineRouteArgs) return false;
return key == other.key && album == other.album;
}
@override
int get hashCode => key.hashCode ^ album.hashCode;
} }
/// generated route for /// generated route for
@@ -1186,6 +1381,16 @@ class MapLocationPickerRouteArgs {
String toString() { String toString() {
return 'MapLocationPickerRouteArgs{key: $key, initialLatLng: $initialLatLng}'; return 'MapLocationPickerRouteArgs{key: $key, initialLatLng: $initialLatLng}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! MapLocationPickerRouteArgs) return false;
return key == other.key && initialLatLng == other.initialLatLng;
}
@override
int get hashCode => key.hashCode ^ initialLatLng.hashCode;
} }
/// generated route for /// generated route for
@@ -1225,6 +1430,16 @@ class PinAuthRouteArgs {
String toString() { String toString() {
return 'PinAuthRouteArgs{key: $key, createPinCode: $createPinCode}'; return 'PinAuthRouteArgs{key: $key, createPinCode: $createPinCode}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! PinAuthRouteArgs) return false;
return key == other.key && createPinCode == other.createPinCode;
}
@override
int get hashCode => key.hashCode ^ createPinCode.hashCode;
} }
/// generated route for /// generated route for
@@ -1263,6 +1478,16 @@ class ProfilePictureCropRouteArgs {
String toString() { String toString() {
return 'ProfilePictureCropRouteArgs{key: $key, asset: $asset}'; return 'ProfilePictureCropRouteArgs{key: $key, asset: $asset}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! ProfilePictureCropRouteArgs) return false;
return key == other.key && asset == other.asset;
}
@override
int get hashCode => key.hashCode ^ asset.hashCode;
} }
/// generated route for /// generated route for
@@ -1300,6 +1525,16 @@ class RemoteAlbumRouteArgs {
String toString() { String toString() {
return 'RemoteAlbumRouteArgs{key: $key, album: $album}'; return 'RemoteAlbumRouteArgs{key: $key, album: $album}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! RemoteAlbumRouteArgs) return false;
return key == other.key && album == other.album;
}
@override
int get hashCode => key.hashCode ^ album.hashCode;
} }
/// generated route for /// generated route for
@@ -1369,6 +1604,16 @@ class SettingsSubRouteArgs {
String toString() { String toString() {
return 'SettingsSubRouteArgs{section: $section, key: $key}'; return 'SettingsSubRouteArgs{section: $section, key: $key}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! SettingsSubRouteArgs) return false;
return section == other.section && key == other.key;
}
@override
int get hashCode => section.hashCode ^ key.hashCode;
} }
/// generated route for /// generated route for
@@ -1406,6 +1651,22 @@ class ShareIntentRouteArgs {
String toString() { String toString() {
return 'ShareIntentRouteArgs{key: $key, attachments: $attachments}'; return 'ShareIntentRouteArgs{key: $key, attachments: $attachments}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! ShareIntentRouteArgs) return false;
return key == other.key &&
const ListEquality<ShareIntentAttachment>().equals(
attachments,
other.attachments,
);
}
@override
int get hashCode =>
key.hashCode ^
const ListEquality<ShareIntentAttachment>().hash(attachments);
} }
/// generated route for /// generated route for
@@ -1466,6 +1727,23 @@ class SharedLinkEditRouteArgs {
String toString() { String toString() {
return 'SharedLinkEditRouteArgs{key: $key, existingLink: $existingLink, assetsList: $assetsList, albumId: $albumId}'; return 'SharedLinkEditRouteArgs{key: $key, existingLink: $existingLink, assetsList: $assetsList, albumId: $albumId}';
} }
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (other is! SharedLinkEditRouteArgs) return false;
return key == other.key &&
existingLink == other.existingLink &&
const ListEquality<String>().equals(assetsList, other.assetsList) &&
albumId == other.albumId;
}
@override
int get hashCode =>
key.hashCode ^
existingLink.hashCode ^
const ListEquality<String>().hash(assetsList) ^
albumId.hashCode;
} }
/// generated route for /// generated route for
@@ -50,7 +50,7 @@ class ImmichAppBarDialog extends HookConsumerWidget {
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
children: [ children: [
IconButton( IconButton(
onPressed: () => context.pop(), onPressed: () => ContextHelper(context).pop(),
icon: Icon(Icons.close, size: 20, color: context.colorScheme.onSurfaceVariant), icon: Icon(Icons.close, size: 20, color: context.colorScheme.onSurfaceVariant),
), ),
Align( Align(
@@ -179,7 +179,7 @@ class ImmichAppBarDialog extends HookConsumerWidget {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
context.pop(); ContextHelper(context).pop();
launchUrl(Uri.parse('https://docs.immich.app'), mode: LaunchMode.externalApplication); launchUrl(Uri.parse('https://docs.immich.app'), mode: LaunchMode.externalApplication);
}, },
child: Text("documentation", style: context.textTheme.bodySmall).tr(), child: Text("documentation", style: context.textTheme.bodySmall).tr(),
@@ -187,7 +187,7 @@ class ImmichAppBarDialog extends HookConsumerWidget {
const SizedBox(width: 20, child: Text("", textAlign: TextAlign.center)), const SizedBox(width: 20, child: Text("", textAlign: TextAlign.center)),
InkWell( InkWell(
onTap: () { onTap: () {
context.pop(); ContextHelper(context).pop();
launchUrl(Uri.parse('https://github.com/immich-app/immich'), mode: LaunchMode.externalApplication); launchUrl(Uri.parse('https://github.com/immich-app/immich'), mode: LaunchMode.externalApplication);
}, },
child: Text("profile_drawer_github", style: context.textTheme.bodySmall).tr(), child: Text("profile_drawer_github", style: context.textTheme.bodySmall).tr(),
@@ -195,7 +195,7 @@ class ImmichAppBarDialog extends HookConsumerWidget {
const SizedBox(width: 20, child: Text("", textAlign: TextAlign.center)), const SizedBox(width: 20, child: Text("", textAlign: TextAlign.center)),
InkWell( InkWell(
onTap: () async { onTap: () async {
context.pop(); ContextHelper(context).pop();
final packageInfo = await PackageInfo.fromPlatform(); final packageInfo = await PackageInfo.fromPlatform();
showLicensePage( showLicensePage(
context: context, context: context,
@@ -235,7 +235,7 @@ class ImmichAppBarDialog extends HookConsumerWidget {
return Dismissible( return Dismissible(
behavior: HitTestBehavior.translucent, behavior: HitTestBehavior.translucent,
direction: DismissDirection.down, direction: DismissDirection.down,
onDismissed: (_) => context.pop(), onDismissed: (_) => ContextHelper(context).pop(),
key: const Key('app_bar_dialog'), key: const Key('app_bar_dialog'),
child: Dialog( child: Dialog(
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
@@ -107,7 +107,7 @@ class _LocationPicker extends HookWidget {
), ),
actions: [ actions: [
TextButton( TextButton(
onPressed: () => context.pop(), onPressed: () => ContextHelper(context).pop(),
child: Text( child: Text(
"cancel", "cancel",
style: context.textTheme.bodyMedium?.copyWith( style: context.textTheme.bodyMedium?.copyWith(
@@ -703,11 +703,11 @@ class _DeleteConfirmationDialog extends StatelessWidget {
), ),
actions: [ actions: [
TextButton( TextButton(
onPressed: () => context.pop(false), onPressed: () => ContextHelper(context).pop(false),
child: Text('cancel'.t(context: context)), child: Text('cancel'.t(context: context)),
), ),
ElevatedButton( ElevatedButton(
onPressed: () => context.pop(true), onPressed: () => ContextHelper(context).pop(true),
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: context.colorScheme.error, backgroundColor: context.colorScheme.error,
foregroundColor: context.colorScheme.onError, foregroundColor: context.colorScheme.onError,
@@ -747,7 +747,7 @@ class _DeleteSuccessDialog extends StatelessWidget {
), ),
actions: [ actions: [
ElevatedButton( ElevatedButton(
onPressed: () => context.pop(), onPressed: () => ContextHelper(context).pop(),
child: Text('done'.t(context: context)), child: Text('done'.t(context: context)),
), ),
], ],
+99 -68
View File
@@ -5,18 +5,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: _fe_analyzer_shared name: _fe_analyzer_shared
sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57 sha256: "8d7ff3948166b8ec5da0fbb5962000926b8e02f2ed9b3e51d1738905fbd4c98d"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "80.0.0" version: "93.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e" sha256: de7148ed2fcec579b19f122c1800933dfa028f6d9fd38a152b04b1516cec120b
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.3.0" version: "10.0.1"
ansicolor: ansicolor:
dependency: transitive dependency: transitive
description: description:
@@ -53,18 +53,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: auto_route name: auto_route
sha256: "1d1bd908a1fec327719326d5d0791edd37f16caff6493c01003689fb03315ad7" sha256: e9acfeb3df33d188fce4ad0239ef4238f333b7aa4d95ec52af3c2b9360dcd969
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.3.0+1" version: "11.1.0"
auto_route_generator: auto_route_generator:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: auto_route_generator name: auto_route_generator
sha256: c2e359d8932986d4d1bcad7a428143f81384ce10fef8d4aa5bc29e1f83766a46 sha256: "7aa0e90874928e78709f0a21a69fb5bc2ae1aa932dec862930d2af85c40adb01"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.3.1" version: "10.5.0"
background_downloader: background_downloader:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -133,18 +133,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: build name: build
sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 sha256: aadd943f4f8cc946882c954c187e6115a84c98c81ad1d9c6cbf0895a8c85da9c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.2" version: "4.0.5"
build_config: build_config:
dependency: transitive dependency: transitive
description: description:
name: build_config name: build_config
sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" sha256: "4070d2a59f8eec34c97c86ceb44403834899075f66e8a9d59706f8e7834f6f71"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.2" version: "1.3.0"
build_daemon: build_daemon:
dependency: transitive dependency: transitive
description: description:
@@ -153,30 +153,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.4" version: "4.0.4"
build_resolvers:
dependency: transitive
description:
name: build_resolvers
sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0
url: "https://pub.dev"
source: hosted
version: "2.4.4"
build_runner: build_runner:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: build_runner name: build_runner
sha256: "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99" sha256: "521daf8d189deb79ba474e43a696b41c49fb3987818dbacf3308f1e03673a75e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.15" version: "2.13.1"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021"
url: "https://pub.dev"
source: hosted
version: "8.0.0"
built_collection: built_collection:
dependency: transitive dependency: transitive
description: description:
@@ -189,10 +173,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: built_value name: built_value
sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 sha256: "0730c18c770d05636a8f945c32a4d7d81cb6e0f0148c8db4ad12e7748f7e49af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.9.5" version: "8.12.5"
cast: cast:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -241,14 +225,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.2" version: "1.1.2"
code_assets:
dependency: transitive
description:
name: code_assets
sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
code_builder: code_builder:
dependency: transitive dependency: transitive
description: description:
name: code_builder name: code_builder
sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" sha256: "6a6cab2ba4680d6423f34a9b972a4c9a94ebe1b62ecec4e1a1f2cba91fd1319d"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.10.1" version: "4.11.1"
collection: collection:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -326,10 +318,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: dart_style name: dart_style
sha256: "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af" sha256: "29f7ecc274a86d32920b1d9cfc7502fa87220da41ec60b55f329559d5732e2b2"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.0" version: "3.1.7"
dbus: dbus:
dependency: transitive dependency: transitive
description: description:
@@ -365,28 +357,27 @@ packages:
drift: drift:
dependency: "direct main" dependency: "direct main"
description: description:
path: drift name: drift
ref: "53ef7e9f19fe8f68416251760b4b99fe43f1c575" sha256: "055c249d1f91be5a47fe447f88afc24c4ca6f4cd6c5ed66767b4797d48acc2e5"
resolved-ref: "53ef7e9f19fe8f68416251760b4b99fe43f1c575" url: "https://pub.dev"
url: "https://github.com/immich-app/drift" source: hosted
source: git version: "2.32.1"
version: "2.26.0"
drift_dev: drift_dev:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: drift_dev name: drift_dev
sha256: "0d3f8b33b76cf1c6a82ee34d9511c40957549c4674b8f1688609e6d6c7306588" sha256: "88a9de3af8571518148a6d8a513b57779fd1e60a026d3ab8a481a878fba01d91"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.26.0" version: "2.32.1"
drift_flutter: drift_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
name: drift_flutter name: drift_flutter
sha256: b52bd710f809db11e25259d429d799d034ba1c5224ce6a73fe8419feb980d44c sha256: "887fdec622174dc7eaefd0048403e34ee07cc18626ac8a7544cc3b8a4a172166"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.6" version: "0.3.0"
dynamic_color: dynamic_color:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -785,6 +776,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.8.1" version: "0.8.1"
hooks:
dependency: transitive
description:
name: hooks
sha256: e79ed1e8e1929bc6ecb6ec85f0cb519c887aa5b423705ded0d0f2d9226def388
url: "https://pub.dev"
source: hosted
version: "1.0.2"
hooks_riverpod: hooks_riverpod:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -793,6 +792,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.6.1" version: "2.6.1"
hotreloader:
dependency: transitive
description:
name: hotreloader
sha256: "66871df468fc24eee81f1a0a7cb98acc104716f9b7376d355437b48d633c4ebf"
url: "https://pub.dev"
source: hosted
version: "4.4.0"
html: html:
dependency: transitive dependency: transitive
description: description:
@@ -981,6 +988,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.2" version: "3.0.2"
lean_builder:
dependency: transitive
description:
name: lean_builder
sha256: ee4117b03e93a4eb83e1a78c8e7a1dc22188d43bb142309982be48673a1b3a53
url: "https://pub.dev"
source: hosted
version: "0.1.7"
lints: lints:
dependency: transitive dependency: transitive
description: description:
@@ -1101,6 +1116,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.4" version: "1.0.4"
native_toolchain_c:
dependency: transitive
description:
name: native_toolchain_c
sha256: "6ba77bb18063eebe9de401f5e6437e95e1438af0a87a3a39084fbd37c90df572"
url: "https://pub.dev"
source: hosted
version: "0.17.6"
native_video_player: native_video_player:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -1322,10 +1345,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: pigeon name: pigeon
sha256: "0045b172d1da43c40cb3f58e80e04b50a65cba20b8b70dc880af04181f7758da" sha256: "04cfefc8add8b47ddf9ccac8b92bb4edeb67c87f185c623ba0db118ac99334ad"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "26.0.2" version: "26.3.4"
pinput: pinput:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -1600,18 +1623,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_gen name: source_gen
sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" sha256: "732792cfd197d2161a65bb029606a46e0a18ff30ef9e141a7a82172b05ea8ecd"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.0" version: "4.2.2"
source_span: source_span:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.10.1" version: "1.10.2"
sprintf: sprintf:
dependency: transitive dependency: transitive
description: description:
@@ -1660,30 +1683,38 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.0" version: "2.4.0"
sqlcipher_flutter_libs:
dependency: transitive
description:
name: sqlcipher_flutter_libs
sha256: "38d62d659d2fb8739bf25a42c9a350d1fdd6c29a5a61f13a946778ec75d27929"
url: "https://pub.dev"
source: hosted
version: "0.7.0+eol"
sqlite3: sqlite3:
dependency: transitive dependency: transitive
description: description:
name: sqlite3 name: sqlite3
sha256: "310af39c40dd0bb2058538333c9d9840a2725ae0b9f77e4fd09ad6696aa8f66e" sha256: "56da3e13ed7d28a66f930aa2b2b29db6736a233f08283326e96321dd812030f5"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.7.5" version: "3.3.1"
sqlite3_flutter_libs: sqlite3_flutter_libs:
dependency: transitive dependency: transitive
description: description:
name: sqlite3_flutter_libs name: sqlite3_flutter_libs
sha256: "7adb4cc96dc08648a5eb1d80a7619070796ca6db03901ff2b6dcb15ee30468f3" sha256: "3ed7553eee7bb368f8950f58ba29f634e06e813c029aff6a0d60862b96de8454"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.31" version: "0.6.0+eol"
sqlparser: sqlparser:
dependency: transitive dependency: transitive
description: description:
name: sqlparser name: sqlparser
sha256: "27dd0a9f0c02e22ac0eb42a23df9ea079ce69b52bb4a3b478d64e0ef34a263ee" sha256: ab2b467425f1d4f3acfa5fd11a08226f7d6c26ff102c06be1807e1dff34e050b
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.41.0" version: "0.44.3"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@@ -1772,14 +1803,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.9.4" version: "0.9.4"
timing:
dependency: transitive
description:
name: timing
sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@@ -1936,10 +1959,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: watcher name: watcher
sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.2.1"
web: web:
dependency: transitive dependency: transitive
description: description:
@@ -2020,6 +2043,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.6.1" version: "6.6.1"
xxh3:
dependency: transitive
description:
name: xxh3
sha256: "399a0438f5d426785723c99da6b16e136f4953fb1e9db0bf270bd41dd4619916"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:
+5 -12
View File
@@ -10,7 +10,7 @@ environment:
dependencies: dependencies:
async: ^2.13.0 async: ^2.13.0
auto_route: ^9.2.0 auto_route: ^11.1.0
background_downloader: ^9.3.0 background_downloader: ^9.3.0
cast: ^2.1.0 cast: ^2.1.0
collection: ^1.19.1 collection: ^1.19.1
@@ -19,8 +19,8 @@ dependencies:
crypto: ^3.0.6 crypto: ^3.0.6
device_info_plus: ^12.2.0 device_info_plus: ^12.2.0
# DB # DB
drift: ^2.26.0 drift: ^2.32.1
drift_flutter: ^0.2.6 drift_flutter: ^0.3.0
dynamic_color: ^1.8.1 dynamic_color: ^1.8.1
easy_localization: ^3.0.8 easy_localization: ^3.0.8
ffi: ^2.1.4 ffi: ^2.1.4
@@ -91,10 +91,10 @@ dependencies:
path: pkgs/ok_http/ path: pkgs/ok_http/
dev_dependencies: dev_dependencies:
auto_route_generator: ^9.0.0 auto_route_generator: ^10.5.0
build_runner: ^2.4.8 build_runner: ^2.4.8
# Drift generator # Drift generator
drift_dev: ^2.26.0 drift_dev: ^2.32.1
fake_async: ^1.3.3 fake_async: ^1.3.3
file: ^7.0.1 # for MemoryFileSystem file: ^7.0.1 # for MemoryFileSystem
flutter_launcher_icons: ^0.14.4 flutter_launcher_icons: ^0.14.4
@@ -108,13 +108,6 @@ dev_dependencies:
# Type safe platform code # Type safe platform code
pigeon: ^26.0.2 pigeon: ^26.0.2
dependency_overrides:
drift:
git:
url: https://github.com/immich-app/drift
ref: '53ef7e9f19fe8f68416251760b4b99fe43f1c575'
path: drift/
flutter: flutter:
uses-material-design: true uses-material-design: true
assets: assets: