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(\"
Here it is working solution:
var sampleList = ['1', '2', '3', '3', '4', '4']; //print('orignal: $sampleList'); sampleList = Set.of(sampleList).toList(); //print('processed: $sampleList');
Output:
orignal: [1, 2, 3, 3, 4, 4] processed: [1, 2, 3, 4]