theyakka / qr.flutter

QR.Flutter is a Flutter library for simple and fast QR code rendering via a Widget or custom painter.
https://pub.dev/packages/qr_flutter
BSD 3-Clause "New" or "Revised" License
716 stars 320 forks source link

Failed to build #187

Open excode opened 2 years ago

excode commented 2 years ago
Screenshot 2022-08-27 at 11 23 30 PM
    /var/folders/f1/8q9txtbx45j5yjbfwx7vcfmm0000gn/T/flutter_tools.ku3Mtb/flutter_ios_build_temp_dirLnOtSR/temporary_xcresult_bundle

../../../.pub-cache/hosted/pub.dartlang.org/qr_flutter-4.0.0/lib/src/qr_painter.dart:213:28: Error: The method 'isDark' isn't defined for the class 'QrCode'.
 - 'QrCode' is from 'package:qr/src/qr_code.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/qr-3.0.1/lib/src/qr_code.dart').
Try correcting the name to the name of an existing method, or defining a method named 'isDark'.
        final paint = _qr!.isDark(y, x) ? pixelPaint : emptyPixelPaint;
                           ^^^^^^
../../../.pub-cache/hosted/pub.dartlang.org/qr_flutter-4.0.0/lib/src/qr_painter.dart:261:17: Error: The method 'isDark' isn't defined for the class 'QrCode'.
 - 'QrCode' is from 'package:qr/src/qr_code.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/qr-3.0.1/lib/src/qr_code.dart').
Try correcting the name to the name of an existing method, or defining a method named 'isDark'.
    return _qr!.isDark(y + 1, x);
                ^^^^^^
../../../.pub-cache/hosted/pub.dartlang.org/qr_flutter-4.0.0/lib/src/qr_painter.dart:266:17: Error: The method 'isDark' isn't defined for the class 'QrCode'.
 - 'QrCode' is from 'package:qr/src/qr_code.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/qr-3.0.1/lib/src/qr_code.dart').
Try correcting the name to the name of an existing method, or defining a method named 'isDark'.
    return _qr!.isDark(y, x + 1);
                ^^^^^^
../../../.pub-cache/hosted/pub.dartlang.org/qr_flutter-4.0.0/lib/src/validator.dart:32:14: Error: The method 'make' isn't defined for the class 'QrCode'.
 - 'QrCode' is from 'package:qr/src/qr_code.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/qr-3.0.1/lib/src/qr_code.dart').
Try correcting the name to the name of an existing method, or defining a method named 'make'.
      qrCode.make();
             ^^^^
Failed to package /Users/kalamazad/Documents/Apps/mpa.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order

Result bundle written to path:
    /var/folders/f1/8q9txtbx45j5yjbfwx7vcfmm0000gn/T/flutter_tools.ku3Mtb/flutter_ios_build_temp_dirLnOtSR/temporary_xcresult_bundle

Failed to build

excode commented 2 years ago

Any idea how to resolve the issue.

Stuck for 2 days :-( Flutter version 3.1.0

fernan542 commented 1 year ago

Try to replace your pubspec.yaml dependency with this:

  qr_flutter:
    git: 
      url: https://github.com/theyakka/qr.flutter.git
      ref: master

Also keep in mind that it has a breaking changes where the previous QrImage widget is replaced by QrImageView.

BraveEvidence commented 1 year ago

This might help https://www.youtube.com/watch?v=9ADSWmPCJMg&list=PLQhQEGkwKZUqZC2QAp_u4ZAzqpsCCRvmM&index=6 https://www.youtube.com/watch?v=ZRUE1i15TYw&list=PLQhQEGkwKZUqZC2QAp_u4ZAzqpsCCRvmM&index=7