setStartDateBackBy method

Future<void> setStartDateBackBy({
  1. required int days,
})

Implementation

Future<void> setStartDateBackBy({required int days}) async {
  await deleteProgress();
  progress = await SupabaseQuery.batchUpsert<SubjectProgress>(
    progress.map((p) => p.setStartDateBackBy(days: days).toJson()).toList(),
  );
  startedAt = startedAt!.subtract(Duration(days: days));
  save(onlyUpdate: true);
}