dart contains code example
Example 1: dart contains method
void main(){
var x = "This is a string.";
var y = "a";
var match = x.contains(y);
print(match);
}
Example 2: contains in flutter
List<String> myList = ['US', 'SG', 'US'];
print(myList.where((item) => item.contains("US")));