getPropertyAs<T> method
Gets a property with key
.
mapper
Maps the value to T
.
def
The default value if key
not found.
Implementation
// ignore: use_function_type_syntax_for_parameters
T? getPropertyAs<T>(String key, T? mapper(Object? v), [T? def]) {
var val = findKeyValue(_map, [key], true);
return val != null ? mapper(val) : def;
}