cbl_flutter
3.3.6, released 2 weeks ago by cbl-dart.dev
Flutter plugin for Couchbase Lite, an embedded NoSQL document database with sync support.
What it does
Provides a Dart API to open, query, and modify Couchbase Lite databases on mobile and desktop. Includes observable change notifications and built‑in data synchronization capabilities.
AI-written summary of version 3.3.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a full‑featured offline‑first NoSQL database with query and sync support across Android, iOS, macOS, Windows, and Linux.
- You want a single library that handles documents, full‑text search, and live queries without writing platform‑specific code.
Skip it when
- You only need simple key‑value storage or a lightweight SQLite wrapper.
- App size or native binary size must be minimal.
- You require an officially supported Couchbase product.
Strengths
- Multi‑platform native implementation
- Rich query language (SQL++, QueryBuilder) and full‑text search
- Built‑in change listeners and data sync
Weaknesses
- Large native binaries increase app size
- Not an official Couchbase product (may affect support)
- Complexity compared to simple key‑value stores
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 3
Compiles native Couchbase Lite libraries; ensure Android API 34 or higher and iOS/macOS native setup as per documentation.
import 'package:cbl/cbl.dart';
Future<void> run() async {
final db = await Database.openAsync('mydb');
final coll = await db.createCollection('items');
final doc = MutableDocument({'name':'example'});
await coll.saveDocument(doc);
final fetched = await coll.document(doc.id);
print('Fetched: ${fetched?.string('name')}');
await db.close();
}Alternatives
Packages that do the same job and could replace cbl_flutter.
Works with
Packages commonly used together with cbl_flutter: ones it builds on, ones built on it, and its own family.
- path_providercbl_flutter depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- cblcbl_flutter depends on itAn offline-first NoSQL document database with SQL++ queries, full-text search, and bi-directional sync.
- cbl_dartSame familyEmbedded NoSQL JSON document database for pure Dart and Flutter apps.