setStatus method
Implementation
@protected
void setStatus(SyncStatus status) {
if (status != currentStatus) {
currentStatus = status.copyWith(
// Note that currently the streaming sync implementation will never set hasSynced.
// lastSyncedAt implies that syncing has completed at some point (hasSynced = true).
// The previous values of hasSynced should be preserved here.
hasSynced: status.lastSyncedAt != null
? true
: status.hasSynced ?? currentStatus.hasSynced,
lastSyncedAt: status.lastSyncedAt ?? currentStatus.lastSyncedAt);
statusStreamController.add(currentStatus);
}
}