toggleFlash method

Future<void> toggleFlash()

Toggles the flashlight between available modes

Implementation

Future<void> toggleFlash() async {
  try {
    await _channel.invokeMethod('toggleFlash') as bool?;
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}