removeDuplicates<I> method
void
removeDuplicates<I>(
- I constraintMapper(
- E element
Implementation
void removeDuplicates<I>(I Function(E element) constraintMapper) {
final distinctList = map(constraintMapper).toSet();
retainWhere((element) => distinctList.remove(constraintMapper(element)));
}