From 3bdfebfcea2547410514ff983d78ddc024ac6da4 Mon Sep 17 00:00:00 2001 From: Muhammed Ayimen Date: Wed, 8 Nov 2023 21:47:59 +0900 Subject: [PATCH] Added: Comments for different widgets used --- lib/ui/settings/data/import/analyze_qr_code.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/ui/settings/data/import/analyze_qr_code.dart b/lib/ui/settings/data/import/analyze_qr_code.dart index 6a61974c8b..a3f908d617 100644 --- a/lib/ui/settings/data/import/analyze_qr_code.dart +++ b/lib/ui/settings/data/import/analyze_qr_code.dart @@ -21,6 +21,8 @@ class QrScanner extends StatefulWidget { class _QrScannerState extends State { bool isNavigationPerformed = false; + + //Scanner Initialization MobileScannerController scannerController = MobileScannerController( detectionSpeed: DetectionSpeed.normal, facing: CameraFacing.back, @@ -120,7 +122,10 @@ class _QrScannerState extends State { } }, ), + // Qr code scanner overlay const QRScannerOverlay(), + + // Torch and gallery buttons Positioned( top: 150, left: 0, @@ -128,6 +133,7 @@ class _QrScannerState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ + // Torch button IconButton( icon: ValueListenableBuilder( valueListenable: scannerController.torchState, @@ -147,6 +153,8 @@ class _QrScannerState extends State { iconSize: 60, onPressed: () => scannerController.toggleTorch(), ), + + // Gallery button IconButton( icon: SvgPicture.asset( 'assets/custom-icons/icons/gallery.svg', @@ -259,6 +267,8 @@ class _QrScannerState extends State { ), ], ), + + // Close button Positioned( left: 25, top: 25,