Dart LinkedHashSet : create and iterate

LinkedHashSet keep track of the values inserted and we can iterate through the elements as they are inserted :

import 'dart:collection';

main(List<String> args) {
  var linkedHashSet = LinkedHashSet.from([1, 4, 3, 2, 5, 3, 2, 1]);
  linkedHashSet.forEach((e) => print(e));
}

It will print :

1 4 3 2 5