valueAsSet<T extends Set?> method
T
valueAsSet<T extends Set?>(})
Reads key and coerces it to a Set.
Implementation
T valueAsSet<T extends Set?>(
K key, {
T Function(BuError err)? onError,
T Function()? onMissing,
/// Only applicable when [K] is `String`.
bool normalizeKeyLookup = false,
}) {
try {
final value = _checkItem<T>(key, onMissing, normalizeKeyLookup);
if (value == null) return value as T;
return JsonParser.valueAsSet<T>(value);
} on BuError catch (e) {
if (onError != null) return onError(e);
throw CoreErrors.jsonErrorWithKey(e, key);
}
}