whereMultiple method

PaginatedModel<T> whereMultiple(
  1. Map<String, dynamic> conditions
)

Filters items by multiple field-value pairs (AND condition)

Example:

final result = response.whereMultiple({
  'status': 'active',
  'type': 'premium',
  'verified': true
});

conditions Map of field names to their expected values

Implementation

PaginatedModel<T> whereMultiple(Map<String, dynamic> conditions) {
  return where((item) {
    final map = item.toJson();
    return conditions.entries.every((entry) => map[entry.key] == entry.value);
  });
}