torchState property

TorchState get torchState

Flashlight torch operation mode (mobile_scanner API compatibility).

Implementation

TorchState get torchState {
  if (_cameraController == null || !_cameraController!.value.isInitialized) {
    return TorchState.off;
  }
  return _isFlashOn ? TorchState.on : TorchState.off;
}