|
1 | 1 | class SyncStatus { |
2 | | - /// true if currently connected |
| 2 | + /// true if currently connected. |
| 3 | + /// |
| 4 | + /// This means the PowerSync connection is ready to download, and |
| 5 | + /// [PowerSyncBackendConnector.uploadData] may be called for any local changes. |
3 | 6 | final bool connected; |
4 | 7 |
|
5 | | - /// true if currently connected |
| 8 | + /// true if the PowerSync connection is busy connecting. |
| 9 | + /// |
| 10 | + /// During this stage, [PowerSyncBackendConnector.uploadData] may already be called, |
| 11 | + /// called, and [uploading] may be true. |
6 | 12 | final bool connecting; |
7 | 13 |
|
8 | | - /// true if downloading changes |
| 14 | + /// true if actively downloading changes. |
| 15 | + /// |
| 16 | + /// This is only true when [connected] is also true. |
9 | 17 | final bool downloading; |
10 | 18 |
|
11 | 19 | /// true if uploading changes |
12 | 20 | final bool uploading; |
13 | 21 |
|
14 | | - /// Time that a last sync has fully completed, if any |
15 | | - /// Currently this is reset to null after a restart |
| 22 | + /// Time that a last sync has fully completed, if any. |
| 23 | + /// |
| 24 | + /// Currently this is reset to null after a restart. |
16 | 25 | final DateTime? lastSyncedAt; |
17 | 26 |
|
18 | 27 | /// Error during uploading. |
| 28 | + /// |
19 | 29 | /// Cleared on the next successful upload. |
20 | 30 | final Object? uploadError; |
21 | 31 |
|
22 | 32 | /// Error during downloading (including connecting). |
| 33 | + /// |
23 | 34 | /// Cleared on the next successful data download. |
24 | 35 | final Object? downloadError; |
25 | 36 |
|
|
0 commit comments