Skip to content
pubscout

sqlite_crdt

3.0.4, released a year ago by cachapa.net

Dart implementation of Conflict-free Replicated Data Types (CRDTs) using Sqlite

$ flutter pub add sqlite_crdt
Source repository

What it does

Implements Conflict-free Replicated Data Types (CRDTs) on top of SQLite for local-first data storage and synchronization. It intercepts SQL write queries to perform CRDT operations transparently and allows watching changed tables.

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

Use it when

  • You need local-first offline storage with synchronization capabilities
  • You want to use standard SQL queries alongside conflict-free data replication

Skip it when

  • You only need a simple key-value store without synchronization
  • Your architecture does not rely on SQLite

Strengths

  • Transparently performs CRDT magic by intercepting SQL write queries
  • Supports watch methods to monitor table changes for atomic sync operations

Weaknesses

  • Requires platform-specific SQLite library setup on native and desktop platforms
  • Web support is experimental and requires extra setup binaries

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
4

Requires sqlite3_flutter_libs on mobile, system library packages on desktop/server, and running `dart run sqflite_common_ffi_web:setup` for web.

// Check example.dart for implementation details.

Alternatives

Packages that do the same job and could replace sqlite_crdt.

  • sqflite

    If you need a standard SQLite database without CRDT synchronization features.

  • drift

    If you prefer a reactive, type-safe SQL database library with code generation.

Works with

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