toggleTorch method

Future<void> toggleTorch()

Toggles the torch (flashlight) between on and off. See setTorchMode and isTorchEnabled.

Implementation

Future<void> toggleTorch() => setTorchMode(!_torchEnabled);