copyWithNull method

CloudSyncable copyWithNull({
  1. bool clearId = false,
  2. bool clearCreatedAt = false,
  3. bool clearUpdatedAt = false,
  4. bool clearLocalTimeSyncedAt = false,
  5. bool clearServerTimeSyncedAt = false,
  6. bool clearDeletedAt = false,
  7. bool clearLocalFilePath = false,
  8. bool clearRemoteFilePath = false,
  9. bool clearFileSyncedAt = false,
  10. bool clearTimeOffset = false,
})

Creates a copy of this object with the specified fields set to null.

Implementation

CloudSyncable copyWithNull({
  bool clearId = false,
  bool clearCreatedAt = false,
  bool clearUpdatedAt = false,
  bool clearLocalTimeSyncedAt = false,
  bool clearServerTimeSyncedAt = false,
  bool clearDeletedAt = false,
  bool clearLocalFilePath = false,
  bool clearRemoteFilePath = false,
  bool clearFileSyncedAt = false,
  bool clearTimeOffset = false,
}) {
  return CloudSyncable(
    id: clearId ? null : id,
    createdAt: clearCreatedAt ? null : createdAt,
    updatedAt: clearUpdatedAt ? null : updatedAt,
    localTimeSyncedAt: clearLocalTimeSyncedAt ? null : localTimeSyncedAt,
    serverTimeSyncedAt: clearServerTimeSyncedAt ? null : serverTimeSyncedAt,
    deletedAt: clearDeletedAt ? null : deletedAt,
    localFilePath: clearLocalFilePath ? null : localFilePath,
    remoteFilePath: clearRemoteFilePath ? null : remoteFilePath,
    fileSyncedAt: clearFileSyncedAt ? null : fileSyncedAt,
    timeOffset: clearTimeOffset ? null : timeOffset,
  );
}