distinctFlat method
Removes duplicate elements from a StringList.
Use the flatEqual function to compare strings.
Implementation
Iterable<string> distinctFlat() {
Set<string> uniqueElements = {};
for (string element in this) {
if (!uniqueElements.any((e) => e.flatEqual(element))) {
uniqueElements.add(element);
}
}
return uniqueElements;
}