whereContains method
Add a constraint for finding String values that contain the provided
substring
Implementation
void whereContains(
String column,
String substring, {
bool caseSensitive = false,
}) {
substring = Uri.encodeComponent(substring);
if (caseSensitive) {
queries.add(MapEntry<String, dynamic>(
_singleQuery, '"$column":{"\$regex": "$substring"}'));
} else {
queries.add(MapEntry<String, dynamic>(_singleQuery,
'"$column":{"\$regex": "$substring", "\$options": "i"}'));
}
}