mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 464 forks source link

[Bug] Strings cancel, flash_on, flash_off doesnt work. Not show #253

Closed muratozbayraktar closed 3 years ago

muratozbayraktar commented 4 years ago

When i open scan, there is nothing about flash on, off options. Maybe cancel. not tested on iOS yet. There no screenshots or usages about there options at readme. I dont know where is it be or seem. Out test devices are Pixcel 2 emulator and Samsung J6 plus device. Cant see anything wrong. Can you help?

Regards,

Flutter 1.17.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b041144f83 (4 days ago) • 2020-06-04 09:26:11 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4
environment:
  sdk: ">=2.2.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  line_icons: ^0.2.0
  font_awesome_flutter: ^8.5.0
  flushbar: ^1.10.2
  flutter_html: ^0.11.0
  webview_flutter: ^0.3.19+7
  permission_handler: ^4.2.0+hotfix.3
  barcode_scan: ^3.0.1
  http: ^0.12.0+4
  flutter_bloc: ^4.0.0
  equatable: ^1.1.0
  flutter_screenutil: ^1.0.2
  build_runner: ^1.7.4
  easy_localization: ^2.3.2
  flutter_secure_storage: ^3.3.1+1
  flutter_svg: ^0.17.4
  shared_preferences: ^0.5.6+3
  theme_provider: ^0.3.3
  cupertino_icons: ^0.1.3
  flutter_scandit: ^0.1.0
  package_info: ^0.4.0+18
 var _scanOptions = ScanOptions(
    restrictFormat: [BarcodeFormat.qr],
    strings: {
      "cancel": "cancel",
      "flash_on": "flashon",
      "flash_off": "flashoff"
    },
    autoEnableFlash: false,
    android: AndroidOptions(
      useAutoFocus: true,
    ),
  );

  Future _scan() async {
    ScanResult qrResult = await BarcodeScanner.scan(options: _scanOptions);
        setState(() {
          ...//Business
      }
  }

WhatsApp Image 2020-06-08 at 12 23 16

ahshingx95 commented 4 years ago

Same, I also could not see the app bar

Update: I found my issue was caused by other dependencies, once I removed the conflicts, the app bar shows up. I suggest you go through your dependencies too. Remember to check your folder at Flutter.pub-cache\hosted\pub.dartlang.org

rdmardegam commented 3 years ago

I have the same problem ... Any solution?