isIn method
Checks if the String exists in a given Iterable<String>
Example
String foo = '6d64-4396-8547-1ec1b86e081e';
var iterable = ['fff','gasd'];
bool isIn = foo.isIn(iterable); // returns false
Implementation
bool? isIn(Iterable<String?> strings) {
if (this == null) {
return null;
}
if (this!.isEmpty) {
return null;
}
return strings.contains(this);
}