getOrDefault<T> method
T
getOrDefault<T>(
- K key,
- T defaultValue
Implementation
T getOrDefault<T>(K key, T defaultValue) {
final thiz = this;
if (thiz == null) return defaultValue;
final value = thiz[key];
return value is T ? value : defaultValue;
}