List<int> duplicates = [1, 1, 2, 4, 2, 6, 8, 4, 5]; List<int> withoutDuplicates = duplicates.toSet().toList();