unregister static method

void unregister(
  1. String eventKey
)

Unregisters an event and cleans up its resources.

This method should be called when you no longer need to track an event. It cancels any active timers and removes the event from tracking.

Implementation

static void unregister(String eventKey) {
  _configs.remove(eventKey);
  _timers[eventKey]?.cancel();
  _timers.remove(eventKey);
  _lastTriggerTimes.remove(eventKey);
  _timeUpdateTimers[eventKey]?.cancel();
  _timeUpdateTimers.remove(eventKey);
}