Skip to content

Instantly share code, notes, and snippets.

@Blasanka
Created December 29, 2019 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Blasanka/73f7c386cbb7246c617712c390d4dbb1 to your computer and use it in GitHub Desktop.
Save Blasanka/73f7c386cbb7246c617712c390d4dbb1 to your computer and use it in GitHub Desktop.
Compare two list and create new list that doesnt have matching elements.
void main() {
List<String> first = ['A','B','C','D'];
List<String> second = ['B','D'];
List<String> result = first.where((item) => !second.contains(item)).toList();
print(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment