Skip to content

Commit

Permalink
Merge pull request #18 from sncf-connect-tech/flutter-0.2
Browse files Browse the repository at this point in the history
feat(flutter maj): flutter 3.5.3 upgrade dependencies
  • Loading branch information
Tiska authored Nov 22, 2024
2 parents eba1378 + 69a73ac commit c447768
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 120 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Autogenerated from Pigeon (v17.0.0), do not edit directly.
// Autogenerated from Pigeon (v22.5.0), do not edit directly.
// See also: https://pub.dev/packages/pigeon
@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass")

package sncf.connect.tech.flutter_google_wallet

Expand All @@ -16,14 +17,14 @@ private fun wrapResult(result: Any?): List<Any?> {
}

private fun wrapError(exception: Throwable): List<Any?> {
if (exception is FlutterError) {
return listOf(
return if (exception is FlutterError) {
listOf(
exception.code,
exception.message,
exception.details
)
} else {
return listOf(
listOf(
exception.javaClass.simpleName,
exception.toString(),
"Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception)
Expand All @@ -42,6 +43,15 @@ class FlutterError (
override val message: String? = null,
val details: Any? = null
) : Throwable()
private open class MessagesPigeonCodec : StandardMessageCodec() {
override fun readValueOfType(type: Byte, buffer: ByteBuffer): Any? {
return super.readValueOfType(type, buffer)
}
override fun writeValue(stream: ByteArrayOutputStream, value: Any?) {
super.writeValue(stream, value)
}
}

/** Generated interface from Pigeon that represents a handler of messages from Flutter. */
interface GoogleWalletApi {
fun initWalletClient()
Expand All @@ -52,21 +62,21 @@ interface GoogleWalletApi {
companion object {
/** The codec used by GoogleWalletApi. */
val codec: MessageCodec<Any?> by lazy {
StandardMessageCodec()
MessagesPigeonCodec()
}
/** Sets up an instance of `GoogleWalletApi` to handle messages through the `binaryMessenger`. */
@Suppress("UNCHECKED_CAST")
fun setUp(binaryMessenger: BinaryMessenger, api: GoogleWalletApi?) {
@JvmOverloads
fun setUp(binaryMessenger: BinaryMessenger, api: GoogleWalletApi?, messageChannelSuffix: String = "") {
val separatedMessageChannelSuffix = if (messageChannelSuffix.isNotEmpty()) ".$messageChannelSuffix" else ""
run {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.flutter_google_wallet.GoogleWalletApi.initWalletClient", codec)
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.flutter_google_wallet.GoogleWalletApi.initWalletClient$separatedMessageChannelSuffix", codec)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped: List<Any?>
try {
val wrapped: List<Any?> = try {
api.initWalletClient()
wrapped = listOf<Any?>(null)
listOf(null)
} catch (exception: Throwable) {
wrapped = wrapError(exception)
wrapError(exception)
}
reply.reply(wrapped)
}
Expand All @@ -76,14 +86,13 @@ interface GoogleWalletApi {
}
run {
val taskQueue = binaryMessenger.makeBackgroundTaskQueue()
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.flutter_google_wallet.GoogleWalletApi.getWalletApiAvailabilityStatus", codec, taskQueue)
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.flutter_google_wallet.GoogleWalletApi.getWalletApiAvailabilityStatus$separatedMessageChannelSuffix", codec, taskQueue)
if (api != null) {
channel.setMessageHandler { _, reply ->
var wrapped: List<Any?>
try {
wrapped = listOf<Any?>(api.getWalletApiAvailabilityStatus())
val wrapped: List<Any?> = try {
listOf(api.getWalletApiAvailabilityStatus())
} catch (exception: Throwable) {
wrapped = wrapError(exception)
wrapError(exception)
}
reply.reply(wrapped)
}
Expand All @@ -92,18 +101,17 @@ interface GoogleWalletApi {
}
}
run {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.flutter_google_wallet.GoogleWalletApi.savePasses", codec)
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.flutter_google_wallet.GoogleWalletApi.savePasses$separatedMessageChannelSuffix", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
val args = message as List<Any?>
val jsonPassArg = args[0] as String
val addToGoogleWalletRequestCodeArg = args[1].let { if (it is Int) it.toLong() else it as Long }
var wrapped: List<Any?>
try {
val addToGoogleWalletRequestCodeArg = args[1] as Long
val wrapped: List<Any?> = try {
api.savePasses(jsonPassArg, addToGoogleWalletRequestCodeArg)
wrapped = listOf<Any?>(null)
listOf(null)
} catch (exception: Throwable) {
wrapped = wrapError(exception)
wrapError(exception)
}
reply.reply(wrapped)
}
Expand All @@ -112,18 +120,17 @@ interface GoogleWalletApi {
}
}
run {
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.flutter_google_wallet.GoogleWalletApi.savePassesJwt", codec)
val channel = BasicMessageChannel<Any?>(binaryMessenger, "dev.flutter.pigeon.flutter_google_wallet.GoogleWalletApi.savePassesJwt$separatedMessageChannelSuffix", codec)
if (api != null) {
channel.setMessageHandler { message, reply ->
val args = message as List<Any?>
val jsonPassArg = args[0] as String
val addToGoogleWalletRequestCodeArg = args[1].let { if (it is Int) it.toLong() else it as Long }
var wrapped: List<Any?>
try {
val addToGoogleWalletRequestCodeArg = args[1] as Long
val wrapped: List<Any?> = try {
api.savePassesJwt(jsonPassArg, addToGoogleWalletRequestCodeArg)
wrapped = listOf<Any?>(null)
listOf(null)
} catch (exception: Throwable) {
wrapped = wrapError(exception)
wrapError(exception)
}
reply.reply(wrapped)
}
Expand Down
46 changes: 23 additions & 23 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.1.4"
version: "0.2.0"
flutter_lints:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -107,10 +107,10 @@ packages:
dependency: transitive
description:
name: http
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.2.2"
http_parser:
dependency: transitive
description:
Expand All @@ -123,34 +123,34 @@ packages:
dependency: transitive
description:
name: intl
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
url: "https://pub.dev"
source: hosted
version: "0.18.1"
version: "0.19.0"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
version: "10.0.5"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.5"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.1"
lints:
dependency: transitive
description:
Expand All @@ -171,18 +171,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.8.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.15.0"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -264,10 +264,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
version: "0.7.2"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -312,18 +312,18 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev"
source: hosted
version: "13.0.0"
version: "14.2.5"
web:
dependency: transitive
description:
name: web
sha256: "1d9158c616048c38f712a6646e317a3426da10e884447626167240d45209cbad"
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "1.1.0"
xml:
dependency: transitive
description:
Expand All @@ -333,5 +333,5 @@ packages:
source: hosted
version: "6.5.0"
sdks:
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.10.0"
dart: ">=3.5.3 <4.0.0"
flutter: ">=3.24.3"
Loading

0 comments on commit c447768

Please sign in to comment.