setTorchOn method

Future<bool?> setTorchOn(
  1. bool isTorchOn
)

设置闪光灯 isTorchOn 打开/关闭闪光灯

Implementation

Future<bool?> setTorchOn(bool isTorchOn) async {
  bool? result = await RBarcode._enableTorch(isTorchOn);
  value = value.copyWith(isTorchOn: result);
  return result;
}