intersection function Null safety
Creates an array of unique values that are included in all given arrays The order and references of result values are determined by the first array.
Implementation
List intersection(List array, List values) {
return array.where((element) => values.contains(element)).toList();
}