getAsList<T> method
Get the list corresponding to key
in the map.
If key
is not found, the list of orElse
is returned.
Implementation
List<T> getAsList<T>(String key, [List<T>? orElse]) {
if (!arg.containsKey(key)) {
return orElse ?? [];
}
return (arg[key] as List?)?.cast<T>() ?? orElse ?? [];
}