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(\"
I have a library called Reactive-Dart that contains many composable operators for terminating and non-terminating sequences. For your scenario it would look something like this:
final newList = [];
Observable
.fromList(['abc', 'abc', 'def'])
.distinct()
.observe((next) => newList.add(next), () => print(newList));
Yielding:
[abc, def]
I should add that there are other libraries out there with similar features. Check around on github and I'm sure you'll find something suitable.