Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scan window does not stay in the middle of the screen. #118

Open
StatTark opened this issue Jul 2, 2024 · 2 comments
Open

Scan window does not stay in the middle of the screen. #118

StatTark opened this issue Jul 2, 2024 · 2 comments

Comments

@StatTark
Copy link

StatTark commented Jul 2, 2024

Scan window does not stay in the middle of the screen.

WhatsApp Image 2024-07-02 at 11 17 58

import 'package:ai_barcode_scanner/ai_barcode_scanner.dart';
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';


@RoutePage()
class BarcodeScanView extends StatefulWidget {
 
  const BarcodeScanView({Key? key}) : super(key: key);

  @override
  State<BarcodeScanView> createState() => _BarcodeScanViewState();
}

class _BarcodeScanViewState extends State<BarcodeScanView> {

  @override
  Widget build(BuildContext context) {
    return AiBarcodeScanner(
      onDetect: (BarcodeCapture capture) async{
        final String? value = capture.barcodes.first.rawValue;

      },
      onDispose: () {
        debugPrint("Barcode scanner disposed!");
      },
      controller: MobileScannerController(
        detectionSpeed: DetectionSpeed.noDuplicates,
        formats: [BarcodeFormat.all],
      )
    );
  }
}

Phone Iphone SE

@rvndsngwn
Copy link
Member

Hi @StatTark

I need to look into what happens here. For now, you can use the cutOutBottomOffset parameter to align that.

@StatTark
Copy link
Author

StatTark commented Jul 2, 2024

Thank you for the suggestion, @rvndsngwn! I'll try using the cutOutBottomOffset parameter to align it. Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants