Skip to content

Commit bca0222

Browse files
Update ScgatewayFlutterPlugin.kt
1 parent 139a973 commit bca0222

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

scgateway/android/src/main/kotlin/com/example/scgateway_flutter_plugin/ScgatewayFlutterPlugin.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,14 @@ class ScgatewayFlutterPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
7878

7979
val res = JSONObject()
8080

81-
val env: String? = call.argument("env")
82-
val gateway: String? = call.argument("gateway")
83-
val leprechaun: Boolean? = call.argument("leprechaun")
84-
val amo: Boolean? = call.argument("amo")
81+
// val env: String? = call.argument("env")
82+
// val gateway: String? = call.argument("gateway")
83+
// val leprechaun: Boolean? = call.argument("leprechaun")
84+
// val amo: Boolean? = call.argument("amo")
85+
val env = call.argument<Any>("env") as? String ?: "GatewayEnvironment.PRODUCTION"
86+
val gateway = call.argument<Any>("gateway") as? String ?: ""
87+
val leprechaun = call.argument<Any>("leprechaun") as? Boolean ?: false
88+
val amo = call.argument<Any>("amo") as? Boolean ?: true
8589

8690
val environment = when (env) {
8791
"GatewayEnvironment.DEVELOPMENT" -> Environment.PROTOCOL.DEVELOPMENT

0 commit comments

Comments
 (0)