stop static method

Future<bool> stop()

Implementation

static Future<bool> stop() async {
  if (currentState == CameraRunningState.stopped ||
      currentState == CameraRunningState.stopping) {
    return true;
  }
  _orientationStream = null;
  currentState = CameraRunningState.stopping;
  bool res;
  try {
    res = await CameraInterface().stop();
  } catch (e) {
    return false;
  }
  currentState = CameraRunningState.stopped;
  return res;
}