recordDetectionCancel method

void recordDetectionCancel(
  1. PointerUpEvent event
)

This will be given to the Listener in the buildCaptureButton. When it's called, which means no more pressing on the button, cancel the timer and reset the status. 这个方法会赋值给 buildCaptureButton 中的 Listener。当按钮释放了点击后,定时器 将被取消,并且状态会重置。

Implementation

void recordDetectionCancel(PointerUpEvent event) {
  recordDetectTimer?.cancel();
  if (innerController?.value.isRecordingVideo == true) {
    stopRecordingVideo();
  }
}