markSynced method

  1. @override
Future<void> markSynced(
  1. List<String> ids,
  2. DateTime serverTimeSyncedAt
)
override

Marks the items with the given ids as synced at the given serverTimeSyncedAt time.

Implementation

@override
Future<void> markSynced(List<String> ids, DateTime serverTimeSyncedAt) async {
  final batch = (database).batch();
  for (final id in ids) {
    batch.update(
      tableName,
      {'server_time_synced_at': serverTimeSyncedAt.toIso8601String()},
      where: 'id = ?',
      whereArgs: [id],
    );
  }
  await batch.commit(noResult: true);
}