Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart compare two lists

if (list1.any((item) => list2.contains(item))) {
    // Lists have at least one common element
} else {
    // Lists DON'T have any common element
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dart #compare #lists
ADD COMMENT
Topic
Name
7+6 =