How do I make a unique list without any duplication value using RxList in Dart or Flutter?
My expectation:
RxList<String> myList = ["Canada", "India", "Canada"];
print(myList);
// My expectation: ["Canada", "India"];
How do I make a unique list without any duplication value using RxList in Dart or Flutter?
My expectation:
RxList<String> myList = ["Canada", "India", "Canada"];
print(myList);
// My expectation: ["Canada", "India"];
2
Answers
You can use the
Set
to remove duplicates on yourRxList
which it’s values aList
: