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(\"
Using dart 2.3+, you can use the spread operators to do this:
final ids = [1, 4, 4, 4, 5, 6, 6]; final distinctIds = [...{...ids}];
Whether this is more or less readable than ids.toSet().toList() I'll let the reader decide :)
ids.toSet().toList()