Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter list distinct

/*
	A quick approach is to first convert your list to a "set"
    which has distinct values by default, then simply convert
    the set back to a list ^_^ I hope that this helps; Happy Coding!
*/
List<String> list = ["a", "a", "b", "c", "b", "d"];
List result = list.toSet().toList();
 
PREVIOUS NEXT
Tagged: #flutter #list #distinct
ADD COMMENT
Topic
Name
9+1 =