It seems I can use default on the declaration. Wha...
# multiplatform
m
It seems I can use default on the declaration. What I cant do is call the function with the named parameters
a
Thanks for the tip. Seems fine for the class. But not the case for a function. Expected declaration can’t have parameters with default value. If I do something like: expect fun get ( url: String, params: Map<String, String>? = mapOf(“1” to “1"), headers: Map<String, String>? ) : Map<String, *>
m
Sorry, I didn't understand very much why this could cause problems. Could I ask you how?
a
If I can’t set the default value, then for some cases, I always needs to pass the explicitly. Which is verbose.