Added: Comments for different widgets used
This commit is contained in:
parent
3db1c55ce3
commit
3bdfebfcea
1 changed files with 10 additions and 0 deletions
|
@ -21,6 +21,8 @@ class QrScanner extends StatefulWidget {
|
|||
|
||||
class _QrScannerState extends State<QrScanner> {
|
||||
bool isNavigationPerformed = false;
|
||||
|
||||
//Scanner Initialization
|
||||
MobileScannerController scannerController = MobileScannerController(
|
||||
detectionSpeed: DetectionSpeed.normal,
|
||||
facing: CameraFacing.back,
|
||||
|
@ -120,7 +122,10 @@ class _QrScannerState extends State<QrScanner> {
|
|||
}
|
||||
},
|
||||
),
|
||||
// Qr code scanner overlay
|
||||
const QRScannerOverlay(),
|
||||
|
||||
// Torch and gallery buttons
|
||||
Positioned(
|
||||
top: 150,
|
||||
left: 0,
|
||||
|
@ -128,6 +133,7 @@ class _QrScannerState extends State<QrScanner> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// Torch button
|
||||
IconButton(
|
||||
icon: ValueListenableBuilder(
|
||||
valueListenable: scannerController.torchState,
|
||||
|
@ -147,6 +153,8 @@ class _QrScannerState extends State<QrScanner> {
|
|||
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<QrScanner> {
|
|||
),
|
||||
],
|
||||
),
|
||||
|
||||
// Close button
|
||||
Positioned(
|
||||
left: 25,
|
||||
top: 25,
|
||||
|
|
Loading…
Add table
Reference in a new issue