Get started with PocketSync in your Flutter application
PocketSyncOptions
class accepts the following parameters:
Parameter | Description | Default |
---|---|---|
projectId | Your project ID from the PocketSync dashboard | Required |
authToken | Authentication token from the PocketSync dashboard | Required |
serverUrl | PocketSync server URL | https://api.pocketsync.dev |
changeLogRetentionDays | Number of days to retain change logs | 30 |
syncExistingData | Whether to sync existing data | true |
conflictResolutionStrategy | Strategy for resolving conflicts | lastWriteWins |
customResolver | Custom conflict resolver function | null |
verbose | Enable detailed logging | false |
PocketSync.instance.start()
to start the sync process.PocketSync.instance.stop()
to stop the sync process.PocketSync.instance.setUserId(userId: 'user-123')
before starting the sync process. This is required to identify the user and track their changes.