mapSet<T> method
Returns a new set containing elements transformed by the given mapper
.
Example:
final set = {1, 2, 3};
print(set.mapSet((e) => e * 2)); // Outputs {2, 4, 6}
Implementation
Set<T> mapSet<T>(T Function(E element) mapper) {
return Set.from(map(mapper));
}