activateCooldown method

Future<void> activateCooldown()

Activates the cooldown using the default duration.

Sets the activation time to the current time and increments the activation count.

Implementation

Future<void> activateCooldown() async {
  await _lastActivated.set(DateTime.now());
  final count = await _activationCount.getOrFallback(0);
  await _activationCount.set(count + 1);
}