parseSet<T> static method

Set<T>? parseSet<T>(
  1. Object? value, {
  2. Set<T>? def,
  3. TypeElementParser<T>? elementParser,
})

Tries to parse a Set.

See parseList.

Implementation

static Set<T>? parseSet<T>(Object? value,
    {Set<T>? def, TypeElementParser<T>? elementParser}) {
  var l = parseList<T>(value, elementParser: elementParser);
  return l?.toSet() ?? def;
}