getMapOpt<K, V> method
Implementation
Map<K, V>? getMapOpt<K, V>(String key, {MappingHooks? hooks}) => hooked(hooks, key, (v) {
if (v == null) {
return null;
} else if (v is! Map) {
throw MapperException('Parameter $v with key $key is not a Map');
}
return v.map((dynamic key, dynamic value) => MapEntry(Mapper.fromValue<K>(key), Mapper.fromValue<V>(value)));
});