PowerSync SDK for Dart and Flutter
PowerSync is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB, MySQL or SQL Server on the server-side.
This package (powersync) is the PowerSync client SDK for Flutter.
See a summary of features here.
Installation
Install the latest version of the package, for example:
dart pub add powersync
Getting Started
Our full SDK reference contains everything you need to know to get started implementing PowerSync in your project.
Web support - Beta
Flutter Web support in version ^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 familiarize yourself with the limitations for Flutter Web documented here.
Demo app
The easiest way to test Flutter Web support is to run the Supabase Todo-List demo app:
- Clone this repo.
- Note: If you are an existing user updating to the latest code after a git pull, run
melos exec 'flutter pub upgrade'in the repo's root directory and make sure it succeeds.
- Run
melos preparein the repo's root - cd into the
demos/supabase-todolistfolder - If you haven’t yet:
cp lib/app_config_template.dart lib/app_config.dart(optionally update this config with your own Supabase and PowerSync project details). - Run
flutter run -d chrome
Additional config
Additional config is required for web projects. Please see our docs here for details.
Changelog
A changelog for this SDK is available here.
API Reference
The full API reference for this SDK can be found here.
Examples
For example projects built with PowerSync and Flutter, see our Demo Apps / Example Projects gallery. Most of these projects can also be found in the demos/ directory.
Found a bug or need help?
- Join our Discord server where you can browse topics from our community, ask questions, share feedback, or just say hello :)
- Please open a GitHub issue when you come across a bug.
- Have feedback or an idea? Submit an idea via our public roadmap or schedule a chat with someone from our product team.
Libraries
- native
- Internal options used to customize how PowerSync opens databases on native platforms.
- powersync
- PowerSync Flutter SDK.
- sqlite3
- Re-exports sqlite3 to expose sqlite3 without adding it as a direct dependency.
- sqlite3_common
- Re-exports sqlite3_common to expose sqlite3_common without adding it as a direct dependency.
- sqlite_async
- Re-exports sqlite_async to expose sqlite_async without adding it as a direct dependency.
- web
- Internal options used to customize how PowerSync opens databases on the web.
- web_worker
- attachments/attachments
- Imports for attachments that are available on all platforms.
- attachments/io
- A platform-specific import supporting attachments on native platforms.
attachments
Attachments