From cc5c098700e618ba5629dbc33a00fce1cae12863 Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Wed, 1 Nov 2023 19:04:47 +0800 Subject: [PATCH] Fix mifareInfo encoding in polling result of Android Signed-off-by: Harry Chen --- .../main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt b/android/src/main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt index e93ae78..6870842 100644 --- a/android/src/main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt +++ b/android/src/main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt @@ -581,13 +581,13 @@ class FlutterNfcKitPlugin : FlutterPlugin, MethodCallHandler, ActivityAware { if (mifareInfo != null) { with(mifareInfo!!) { - jsonResult.put("mifareInfo", mapOf( + jsonResult.put("mifareInfo", JSONObject(mapOf( "type" to typeStr, "size" to size, "blockSize" to blockSize, "blockCount" to blockCount, "sectorCount" to sectorCount - )) + ))) } }