asInt method

int asInt()

Decode value to int.

Implementation

int asInt() {
  if (_value != null) {
    final String strValue = const Utf8Codec().decode(_value);
    final int intValue =
        int.tryParse(strValue) ?? RemoteConfig.defaultValueForInt;
    return intValue;
  } else {
    return RemoteConfig.defaultValueForInt;
  }
}