pauseDetector method

Future<void> pauseDetector()

Pauses the scanner and preview on the platform level.

Implementation

Future<void> pauseDetector() async {
  try {
    await _platform.pause();
    state.eventNotifier.value = CameraEvent.paused;
  } catch (error, stack) {
    state._error = error;
    state.eventNotifier.value = CameraEvent.error;
    debugPrint(error.toString());
    debugPrintStack(stackTrace: stack);
  }
}