Flutter InstantDB
Real-time, offline-first database for Flutter with reactive bindings, type-safe queries and code generation.
A Flutter/Dart port of InstantDB — a real-time, offline-first database with reactive bindings, a type-safe query DSL, code generation, and live multiplayer collaboration.
Installation
Add the package and initialize the client.
Quick Start
Reactive queries, transactions, and your first live widget.
Typed layer
Compile-time-safe queries and writes generated from your models.
Code generation
Annotate a model, run the generator, get typed tables.
A taste
final db = await InstantDB.init(
appId: 'your-app-id',
config: const InstantConfig(syncEnabled: true),
);
final todos = await TodoTable()
.query()
.where((t) => t.done.eq(false))
.order((t) => t.createdAt.desc())
.getAll(db);
await db.transact(
TodoTable().tx(db).createModel(
Todo(id: db.id(), title: 'Ship it', done: false),
),
);