getOrDefault<V> method

V? getOrDefault<V>(
  1. String key,
  2. V? defaultValue
)

Gets key value or returns defaultValue.

Note, this State should be already loaded isLoaded.

Implementation

V? getOrDefault<V>(String key, V? defaultValue) {
  if (!_properties.containsKey(key)) {
    return defaultValue;
  } else {
    return _properties[key] as V?;
  }
}