powersync library

PowerSync with Encryption for Flutter.

Use PowerSyncSQLCipherOpenFactory to open an encrypted database.

Classes

Column
A single column in a table schema.
CrudBatch
A batch of client-side changes.
CrudEntry
A single client-side change.
CrudTransaction
DevConnector
Connects to the PowerSync service in development mode.
DevCredentials
Credentials used to connect to the PowerSync dev API.
Index
IndexedColumn
Describes an indexed column.
PowerSyncBackendConnector
Implement this to connect an app backend.
PowerSyncCredentials
Temporary credentials to connect to the PowerSync service.
PowerSyncDatabase
A PowerSync managed database.
PowerSyncOpenFactory
PowerSyncSQLCipherOpenFactory
A factory for opening a database with SQLCipher encryption. An encryption key is required to open the database.
ProgressWithOperations
Information about a progressing download.
Schema
The schema used by the database.
SyncOptions
Options that affect how the sync client connects to the sync service.
SyncStatus
Table
A single table in the schema.
TrackPreviousValuesOptions
Options to include old values in CrudEntry for update statements.
UploadQueueStats
Stats of the local upload queue.

Enums

ColumnType
Type of column.
SyncClientImplementation
The PowerSync SDK offers two different implementations for receiving sync lines: One handling most logic in Dart, and a newer one offloading that work to the native PowerSync extension.
UpdateType
Type of local change.

Extension Types

BucketPriority
The priority of a PowerSync bucket.
SyncDownloadProgress
Provides realtime progress on how PowerSync is downloading rows.

Properties

attachedLogger → Logger
Standard logger. Does not automatically log to the console, use the Logger.root.onRecord stream to get log messages.
final
autoLogger → Logger
Logger that outputs to the console in debug mode, and nothing in release and profile modes.
final
debugLogger → Logger
Logger that always outputs debug info to the console.
final
uuid → Uuid
final

Typedefs

SyncPriorityStatus = ({bool? hasSynced, DateTime? lastSyncedAt, BucketPriority priority})
Partial information about the synchronization status for buckets within a priority.

Exceptions / Errors

CredentialsException
This indicates an error with configured credentials.
PowersyncNotReadyException
PowerSyncProtocolException
An internal protocol exception.
SyncResponseException
An error that received from the sync service.