File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
firebase-remoteconfig/src/commonMain/kotlin/dev/gitlive/firebase/remoteconfig Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,17 @@ expect class FirebaseRemoteConfig {
2323 suspend fun setDefaults (vararg defaults : Pair <String , Any ?>)
2424}
2525
26+ @Suppress(" IMPLICIT_CAST_TO_ANY" )
2627inline operator fun <reified T > FirebaseRemoteConfig.get (key : String ): T {
2728 val configValue = getValue(key)
2829 return when (T ::class ) {
29- Boolean ::class -> configValue.asBoolean() as T
30- Double ::class -> configValue.asDouble() as T
31- Long ::class -> configValue.asLong() as T
32- String ::class -> configValue.asString() as T
33- FirebaseRemoteConfigValue ::class -> configValue as T
30+ Boolean ::class -> configValue.asBoolean()
31+ Double ::class -> configValue.asDouble()
32+ Long ::class -> configValue.asLong()
33+ String ::class -> configValue.asString()
34+ FirebaseRemoteConfigValue ::class -> configValue
3435 else -> throw IllegalArgumentException ()
35- }
36+ } as T
3637}
3738
3839expect open class FirebaseRemoteConfigException : FirebaseException
You can’t perform that action at this time.
0 commit comments