Skip to content
pubscout

brick_offline_first_with_supabase

2.1.0, released a year ago by an unverified publisher

Routes data fetching through local providers before Supabase with offline caching.

Unverified publisher
$ flutter pub add brick_offline_first_with_supabase
Source repository

What it does

It provides an Offline-First repository domain that integrates Supabase with local SQLite storage. It enables offline request queuing, automatic local caching, and synchronization with Supabase realtime events.

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

Use it when

  • You are building an app with Supabase that requires offline data access and caching.
  • You want automatic synchronization with Supabase realtime changes using a local-first architecture.

Skip it when

  • You are not using Supabase as your backend.
  • Your application does not require local persistence or offline capabilities.

Strengths

  • Seamless offline-first caching with SQLite for Supabase apps.
  • Built-in offline request queue that retries requests upon reconnection.
  • Supports Supabase realtime events to keep local data synchronized.

Weaknesses

  • Brittle offline queue configuration when ignoring core Supabase paths like auth or storage.
  • Complex nullable associations can cause PostgREST to return unfiltered or all results.
  • Requires code generation and specific repository boilerplate.

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
10

Requires databaseFactory setup, model dictionary generation using build_runner, and defining models extending OfflineFirstWithSupabaseModel.

class MyRepository extends OfflineFirstWithSupabaseRepository {
  MyRepository._({required super.supabaseProvider, required super.sqliteProvider, required super.migrations, required super.offlineRequestQueue, super.memoryCacheProvider});
}

Alternatives

Packages that do the same job and could replace brick_offline_first_with_supabase.

  • cloud_firestore

    If you are using Firebase Firestore instead of Supabase for your backend and offline database needs.

Works with

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