^1.9.0
is currently in a beta release. It is functionally ready for production use, provided that you’ve tested your use cases.Please see the Limitations detailed below.melos exec 'flutter pub upgrade'
in the repo’s root and make sure it succeeds.melos prepare
in the repo’s rootdemos/supabase-todolist
foldercp lib/app_config_template.dart lib/app_config.dart
(optionally update this config with your own Supabase and PowerSync project details).flutter run -d chrome
sqlite3.wasm
and worker (powersync_db.worker.js
and powersync_sync.worker.js
) assets to be served from the web application. They can be downloaded to the web directory by running the following command in your application’s root folder.
PowerSyncDatabase
clients.
Cross-Origin-Opener-Policy
: Needs to be set to same-origin
.Cross-Origin-Embedder-Policy
: Needs to be set to require-corp
.flutter build web
, then serving the content with an HTTP server. The server should be configured to use the above headers.
sqlite_async
package under the hood, and has excellent documentation for how the web filesystem is selected. See here for web compatibility notes and here for additional notes on the required web headers.PowerSyncDatabase
clients are not available.
sqlite3.dart
as it uses dart:ffi
.
Change imports from:
sqlite3.dart
.
readLock
and writeLock
contexts do not implement checks for preventing writable queries in read connections and vice-versa.
Direct access to the synchronous CommonDatabase
(sqlite.Database
equivalent for web) connection is not available. computeWithDatabase
is not available on web.