[pve-devel] [PATCH pve-flutter-frontend 03/10] fix null handling in MainActivity.kt
Dominik Csapak
d.csapak at proxmox.com
Thu Sep 8 11:55:43 CEST 2022
in newer flutter versions, call.arguments() can return null, so handle that
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
.../kotlin/com/proxmox/app/pve_flutter_frontend/MainActivity.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/android/app/src/main/kotlin/com/proxmox/app/pve_flutter_frontend/MainActivity.kt b/android/app/src/main/kotlin/com/proxmox/app/pve_flutter_frontend/MainActivity.kt
index 8754f8c..e8aad23 100644
--- a/android/app/src/main/kotlin/com/proxmox/app/pve_flutter_frontend/MainActivity.kt
+++ b/android/app/src/main/kotlin/com/proxmox/app/pve_flutter_frontend/MainActivity.kt
@@ -32,7 +32,7 @@ class MainActivity: FlutterActivity() {
// Note: this method is invoked on the main thread.
Log.d("METHODCHANNEL", call.method)
if (call.method == "shareFile") {
- val serializedShortcuts: Map<String, String> = call.arguments()
+ val serializedShortcuts: Map<String, String> = call.arguments()!!
val path: String = serializedShortcuts.get("path")!!;
val type: String = serializedShortcuts.get("type")!!;
try {
--
2.30.2
More information about the pve-devel
mailing list