SyncDownloadProgress extension type

Provides realtime progress on how PowerSync is downloading rows.

This type reports progress by implementing ProgressWithOperations, meaning that downloadedOperations, totalOperations and downloadedFraction are available on instances of SyncDownloadProgress. Additionally, it's possible to obtain the progress towards a specific priority only (instead of tracking progress for the entire download) by using untilPriority.

The reported progress always reflects the status towards the end of a sync iteration (after which a consistent snapshot of all buckets is available locally).

In rare cases (in particular, when a compacting operation takes place between syncs), it's possible for the returned numbers to be slightly inaccurate. For this reason, SyncDownloadProgress should be seen as an approximation of progress. The information returned is good enough to build progress bars, but not exact enough to track individual download counts.

Also note that data is downloaded in bulk, which means that individual counters are unlikely to be updated one-by-one.

on
  • InternalSyncDownloadProgress
Implemented types

Properties

downloadedFraction double
Relative progress (as a number between 0.0 and 1.0).
no setterinherited
downloadedOperations int
How many operations have already been downloaded since the last complete download.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalOperations int
How many operations need to be downloaded in total until the current download is complete.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
untilPriority(BucketPriority priority) ProgressWithOperations
Returns download progress towards all data up until the specified priority being received.

Operators

operator ==(Object other) bool
The equality operator.
inherited