转换为精确的Set
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); } }