get static method

dynamic get(
  1. String keyName,
  2. PRCType rcType
)

Get the value of keyName with rcType

This function converts the value in the desire type.

Implementation

static dynamic get(String keyName, PRCType rcType) {
  if (PUtils.isOnTest()) return _defaultValues[keyName];
  switch (rcType) {
    case PRCType.STRING:
      return _remoteConfig.getString(keyName);
    case PRCType.INT:
      return _remoteConfig.getInt(keyName);
    case PRCType.DOUBLE:
      return _remoteConfig.getDouble(keyName);
    case PRCType.BOOL:
      return _remoteConfig.getBool(keyName);
    default:
      return PRemoteConfigValue(_remoteConfig.getValue(keyName));
  }
}