getAsSets<T> method

Set<T> getAsSets<T>(
  1. String key, [
  2. Set<T>? orElse
])

Get the set corresponding to key in the map.

If key is not found, the set of orElse is returned.

Implementation

Set<T> getAsSets<T>(String key, [Set<T>? orElse]) {
  if (!arg.containsKey(key)) {
    return orElse ?? {};
  }
  return (arg[key] as Set?)?.cast<T>() ?? orElse ?? {};
}