GithubHelp home page GithubHelp logo

hugobrancowb / barcode_bill_scanner Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 5.0 104 KB

Barcode Bill Scanner aims to be used by brazilian apps willing to get a readable code from a horizontal barcode, mainly from bills.

Home Page: https://pub.dev/packages/barcode_bill_scanner

Dart 90.29% Kotlin 0.50% Ruby 7.42% Swift 1.64% Objective-C 0.15%
flutter barcode hacktoberfest

barcode_bill_scanner's Introduction

Barcode Bill Scanner

Barcode scanner build for Flutter.

Barcode Bill Scanner aims to be used by brazilian apps willing to get a readable code from a horizontal barcode, mainly from bills. Brazilian's pattern for barcode is defined by FEBRABAN, which has a couple of rules for transforming a regular 44-length code into 47~48 character long.

Our package converts the barcode by default to FEBRABAN's format but can easily be turned off if necessary.

How to use

  @override
  Widget build(BuildContext context) {
    return BarcodeBillScanner(
      onCancelLabel: "You can set a message to cancel an action",
      onSuccess: (String value) async {
        setState(() => barcode = value);
      },
      onCancel: () {
        setState(() => barcode = null);
      },
    );
  }

Requirements

iOS
  • Minimum iOS Deployment Target: 10.0
  • Xcode 12 or newer
  • Swift 5
  • ML Kit only supports 64-bit architectures (x86_64 and arm64). Check this list to see if your device has the required device capabilities.

Since ML Kit does not support 32-bit architectures (i386 and armv7) (Read mode), you need to exclude amrv7 architectures in Xcode in order to run flutter build ios or flutter build ipa.

Go to Project > Runner > Building Settings > Excluded Architectures > Any SDK > armv7

Then your Podfile should look like this:

# add this line:
$iOSVersion = '10.0'

post_install do |installer|
  # add these lines:
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
  end
  
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    
    # add these lines:
    target.build_configurations.each do |config|
      if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
      end
    end
    
  end
end
Android
  • minSdkVersion: 21
  • targetSdkVersion: 29

barcode_bill_scanner's People

Contributors

hugobrancowb avatar lucasnsa avatar ricardoborgesjr avatar

Stargazers

 avatar Victor Emanuel avatar Paulo Quicoli avatar  avatar Felipe Bonezi avatar Ethan.D.H.Kim avatar Lucas Adelino avatar Raí Siqueira avatar

Watchers

 avatar  avatar

barcode_bill_scanner's Issues

Lib crashing the application

I'm using this lib in one project but it has started to crash the app after fouding a barcode.
Environment informations:
Phone android version: android 8.0
Phone Model: Xiaomi redmi 5 plus
Flutter 3.3.6

the application throws this Stack trace:
E/AndroidRuntime(19712): FATAL EXCEPTION: main E/AndroidRuntime(19712): Process: br.com.zrobank.app, PID: 19712 E/AndroidRuntime(19712): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/mlkit/vision/barcode/Barcode; E/AndroidRuntime(19712): at com.google_barcode_kit.vision.BarcodeDetector$2.onSuccess(BarcodeDetector.java:87) E/AndroidRuntime(19712): at com.google_barcode_kit.vision.BarcodeDetector$2.onSuccess(BarcodeDetector.java:83) E/AndroidRuntime(19712): at com.google.android.gms.tasks.zzm.run(com.google.android.gms:play-services-tasks@@18.0.1:1) E/AndroidRuntime(19712): at android.os.Handler.handleCallback(Handler.java:794) E/AndroidRuntime(19712): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(19712): at android.os.Looper.loop(Looper.java:176) E/AndroidRuntime(19712): at android.app.ActivityThread.main(ActivityThread.java:6651) E/AndroidRuntime(19712): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(19712): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
And the phone gives this problem description:
image

Won't work on some Android devices

It's a known issue that some low performance Android devices won't reconize the barcode reading. Also, camera view may skip some frames.
Since I don't own such device and couldn't reproduce it on Android Emulator I cannot help on solving this problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.