Flutter Web apps use the sameDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mainser/cindel/llms.txt
Use this file to discover all available pages before exploring further.
Cindel.open call and the same generated typed collections as any other platform. Under the hood, Cindel detects the Web platform and routes through a SQLite Worker and Wasm runtime with OPFS persistence — there is no MDBX in the browser, and no browser-specific code to write in your app. Because Web support is still experimental, you should validate your app in the target browser before shipping.
How Web storage works
On native platforms Cindel defaults to MDBX. On the Web, MDBX is not a browser backend. Instead,Cindel.open transparently switches to a SQLite Worker that runs the Rust Wasm module in a dedicated Web Worker thread and persists data through the Origin Private File System (OPFS) API.
OPFS requires a secure context — your app must be served over HTTPS or from localhost. Pages served over plain HTTP cannot access OPFS and the database will fail to open.
Required packages
Every Flutter Web app that uses Cindel needs both packages.cindel_flutter_libs bundles the Worker JS, the Wasm binary, and the SQLite glue assets — Flutter’s build system picks them up automatically during flutter build web. No manual pubspec.yaml asset declarations are needed.
cindel_flutter_libs Web assets are:
| File | Purpose |
|---|---|
web/cindel_worker.js | Worker bootstrap and scheduling |
web/pkg/cindel_native.js | Wasm JS glue |
web/pkg/cindel_native_bg.wasm | Compiled Rust + SQLite runtime |
Opening a database
The call is identical to native. Cindel’s platform detection is internal — there is noCindelStorageBackend.web option to pass, and no import to change.
directory is a file-system path. On Web, it is the OPFS database name. Pass the same string on every open to reopen the persisted database.
What is supported on Web
The following typed API surface works on Flutter Web:- Typed
put,putAll,get,getAll,delete,deleteAll - Generated
where()andfilter()query helpers findAll,findFirst,count- Sorting and pagination
- Explicit
readTxnandwriteTxn - Single-tab typed object, collection, and query watchers
What is not supported / experimental
The following are outside the current Web preview:- MDBX — not a browser backend; SQLite/OPFS is the only Web path
- Multi-tab coordination — multiple browser tabs targeting the same OPFS database are not coordinated in the current preview
- Query updates (
updateAll) — explicitly rejected when sync is enabled on any platform, including Web
Backup and compression on Web
CindelBackup.exportDatabase and CindelBackup.importDatabase work on Web. Native Dart uses gzip compression by default, but gzip is not available in the browser Wasm runtime. If you need a cross-platform archive that can be imported on both native and Web, pass compression: CindelBackupCompression.none explicitly on all platforms.
CindelBackupCompression.gzip falls back to .none on Web. To produce an archive that is portable across Web and native, pass compression: CindelBackupCompression.none explicitly — do not rely on the automatic fallback.