evaluate method
Evaluates this QueryFieldOperator against other
,
where other
is a field on the model.
Implementation
@override
bool evaluate(dynamic other) {
if (other == null) {
return false;
} else if (other is String) {
return other.contains(value);
} else if (other is List<String>) {
return other.contains(value);
} else {
throw const ModelQueryException(
'Invalid type. The .contains() query predicate only supports type String and List<String>.',
recoverySuggestion: 'Ensure that the field is of the appropriate type.',
);
}
}