resetRecordingActionInProgressAfterDelay method

void resetRecordingActionInProgressAfterDelay([
  1. int seconds = 30
])

Implementation

void resetRecordingActionInProgressAfterDelay([int seconds = 30]) {
  // Cancel any existing timer if one is active
  _resetTimer?.cancel();

  isRecordingActionInProgress = true;

  _resetTimer = Timer(Duration(seconds: seconds), () {
    isRecordingActionInProgress = false;
    _resetTimer = null; // optional: clean up
  });
}