PowerSync SDK for 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 or MySQL on the server-side.

This package (powersync) is the PowerSync client SDK for Flutter.

See a summary of features here.

Note This package is recommended for Flutter applications that do not require on-device encryption.

  • For Flutter applications that require encryption, use the powersync_sqlcipher package.
  • For use cases such as server-side Dart or non-Flutter Dart environments, use the powersync_core package.

Installation

flutter 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:

  1. 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.
  1. Run melos prepare in the repo's root
  2. cd into the demos/supabase-todolist folder
  3. 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).
  4. Run flutter run -d chrome

Installing PowerSync in your own project

Install the latest version of the package, for example:

flutter pub add powersync:'^1.9.0'

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

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.
sqlite3_open
Re-exports sqlite3_open to expose sqlite3_open 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_worker