db.todos, typed query helpers like where() and filter(), and reactive watchers that rebuild your UI when data changes. Under the hood, Cindel’s Rust native core powers MDBX (the default) on native platforms and SQLite Web/OPFS in the browser, so the same application code runs everywhere Flutter runs.
Introduction
Learn what Cindel is, how the code-generation model works, and which backend to choose for your platform.
Quickstart
Build your first Cindel-powered feature in minutes: add packages, annotate a model, generate code, and run your first query.
Data Modeling
Define collections, ids, field types, enums, embedded objects, and Freezed models.
Querying Data
Use generated
where() and filter() helpers for indexed lookups, sorting, pagination, and aggregates.Transactions
Group related reads and writes with
readTxn and writeTxn so they commit or roll back together.Flutter Web
Run the same typed Cindel app code in the browser with SQLite Web/OPFS via
cindel_flutter_libs.How it works
1
Add dependencies
Add
cindel and cindel_flutter_libs to your pubspec.yaml, and build_runner plus cindel_generator to your dev dependencies.2
Annotate a model
Decorate a Dart class with
@Collection(), give it an Id dbId = autoIncrement field, and add @Index to the fields you want to query by.3
Generate code
Run
dart run build_runner build to produce the schema constant, typed collection getter, serializers, and query helpers for every annotated model.4
Open the database and query
Call
Cindel.open(directory: ..., schemas: [YourSchema]), then read and write through the generated typed API — db.todos.put(todo), db.todos.where().findAll(), and db.todos.watchCollection().