implemented user backups
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
extension UniqueItems<T> on Iterable<T> {
|
||||
Iterable<T> findDuplicates() sync* {
|
||||
final seen = <T>{};
|
||||
|
||||
for (final item in this) {
|
||||
if (seen.contains(item)) {
|
||||
yield item;
|
||||
} else {
|
||||
seen.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user