Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -256,7 +256,7 @@ class _MyAppState extends State<BarcodeScannerWithOverlay> { | @@ -256,7 +256,7 @@ class _MyAppState extends State<BarcodeScannerWithOverlay> { | ||
| 256 | children: [ | 256 | children: [ |
| 257 | IconButton(onPressed: ()=>{ | 257 | IconButton(onPressed: ()=>{ |
| 258 | controller.toggleTorch() | 258 | controller.toggleTorch() |
| 259 | - }, icon: const Icon(Icons.flashlight_on, color: Colors.white,),), | 259 | + }, icon: Icon(Icons.flashlight_on, color: controller.torchEnabled ? Colors.yellow : Colors.black,),), |
| 260 | IconButton(onPressed: ()=>{ | 260 | IconButton(onPressed: ()=>{ |
| 261 | controller.switchCamera() | 261 | controller.switchCamera() |
| 262 | }, icon: const Icon(Icons.cameraswitch_rounded, color: Colors.white,)), | 262 | }, icon: const Icon(Icons.cameraswitch_rounded, color: Colors.white,)), |
-
Please register or login to post a comment