matches method
Check if a record matches this filter
Used for local filtering before pushing data to backend.
Implementation
bool matches(Map<String, dynamic> data, DateTime? updatedAt) {
// Check timestamp filter
if (since != null && updatedAt != null) {
if (updatedAt.isBefore(since!)) {
return false;
}
}
// Check field filters
if (where != null) {
for (final entry in where!.entries) {
final fieldValue = data[entry.key];
final filterValue = entry.value;
// Simple equality check
if (fieldValue != filterValue) {
return false;
}
}
}
return true;
}