getListOpt<T> method
Implementation
List<T>? getListOpt<T>(String key, {MappingHooks? hooks}) => hooked(hooks, key, (v) {
if (v == null) {
return null;
} else if (v is! List) {
throw MapperException('Parameter $v with key $key is not a List');
}
return v.map((dynamic item) => Mapper.fromValue<T>(item)).toList();
});