Skip to content
pubscout

postgrest

2.9.1, released 4 months ago by supabase.io

Dart client library offering an ORM‑like interface to PostgREST/Supabase databases.

WASM-readyRock solid
$ flutter pub add postgrest
Source repository

What it does

Provides methods to query, insert, update, and delete data via PostgREST endpoints. It adds features like auto‑retry, request timeout, and request aborting.

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

Use it when

  • You need a typed, ORM‑style client for Supabase/Postgrest in a Flutter/Dart app
  • You prefer a lightweight wrapper over http without code generation

Skip it when

  • You require full code‑generated models (e.g., freezed)
  • You need a different backend service such as Firebase

Strengths

  • ORM‑like API simplifies database operations
  • Built‑in support for auto‑retry, timeout, and abort
  • Integrates tightly with Supabase ecosystem

Weaknesses

  • Relies on http package; no built‑in caching
  • No code‑generation for models, so manual mapping may be needed
  • Limited to Supabase/PostgREST backends

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
5
import 'package:postgrest/postgrest.dart';

final client = PostgrestClient('https://your-project.supabase.co/rest/v1');
final response = await client.from('users').select().execute();
print(response.data);

Alternatives

Packages that do the same job and could replace postgrest.

Works with

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