toTypeSet method

Set? toTypeSet(
  1. Set? source, {
  2. required bool canNull,
})

转换为精确的Set

Implementation

Set? toTypeSet(Set? source, {required bool canNull}) {
  if (source == null) return null;
  if (canNull) {
    return Set<T?>.from(source);
  } else {
    return Set<T>.from(source);
  }
}