How do i delete duplicates from a list without fooling around with a set? Is there something like list.distinct()? or list.unique()?
void main() {
print(\"
If you want to keep ordering or are dealing with more complex objects than primitive types. Store seen ids to the Set and filter away those ones that are already in the set.
final list = ['a', 'a', 'b'];
final seen = Set();
final unique = list.where((str) => seen.add(str)).toList();
print(unique); // => ['a', 'b']