Skip to content
pubscout

filterator

0.1.3, released a year ago by supy.io

A powerful API query builder for constructing structured queries with filtering, ordering, and pagination.

WASM-ready
$ flutter pub add filterator
Source repository

What it does

It provides a type-safe, fluent interface for building complex API queries with filtering, sorting, pagination, and field selection. It includes converters to serialize queries into standard API formats like REST, GraphQL, or OData.

AI-written summary of version 0.1.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to build complex, structured API queries programmatically with nested AND/OR logic.
  • You want to decouple query construction from the underlying transport or API format.

Skip it when

  • Your application only executes raw SQL queries or hardcoded API endpoints without dynamic filtering needs.

Strengths

  • Type-safe fluent interface for query building
  • Support for nested filter groups with unlimited nesting
  • Extensible converters for custom API formats

Weaknesses

  • Requires learning a specific query construction model

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
2
final query = ApiQuery(
  filtering: and(
    filters: [
      where('email', 'contains', '@example.com'),
      wheres('status', 'in', ['active', 'pending']),
    ],
  ),
);

Alternatives

Packages that do the same job and could replace filterator.

Works with

Packages commonly used together with filterator: ones it builds on, ones built on it, and its own family.