We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dba417 commit d83a42eCopy full SHA for d83a42e
lib/src/ai_barcode_scanner.dart
@@ -288,11 +288,15 @@ class _AiBarcodeScannerState extends State<AiBarcodeScanner> {
288
icon: const Icon(Icons.cameraswitch_rounded),
289
onPressed: controller.switchCamera,
290
),
291
+
292
IconButton(
- icon: controller.torchEnabled
293
+ icon: controller.value.torchState == TorchState.on
294
? const Icon(Icons.flashlight_off_rounded)
295
: const Icon(Icons.flashlight_on_rounded),
- onPressed: controller.toggleTorch,
296
+ onPressed: (){
297
+ controller.toggleTorch();
298
+ setState(() {});
299
+ }
300
301
if (!widget.hideGalleryIcon)
302
GalleryButton.icon(
0 commit comments