setTotal method

void setTotal({
  1. required String categoryId,
  2. required int totalCheckpoints,
})

Implementation

void setTotal({
  required String categoryId,
  required int totalCheckpoints,
}) {
  final normalizedTotal = totalCheckpoints < 0 ? 0 : totalCheckpoints;
  if (_totalCheckpointsByCategoryId[categoryId] == normalizedTotal) {
    return;
  }
  _totalCheckpointsByCategoryId[categoryId] = normalizedTotal;
  revision.value++;
}