read<R extends V> method
R?
read<R extends V>(
- K key, [
- R? defaultValue
Return the value of key
in the map if the value type is R. Otherwise, return defaultValue.
Implementation
R? read<R extends V>(K key, [R? defaultValue]) {
final value = this[key];
return (value is R) ? value : defaultValue;
}