Giter Club home page Giter Club logo

vision_camera's People

Contributors

jalpedersen avatar

Stargazers

 avatar

Watchers

 avatar  avatar

vision_camera's Issues

How to make barcode scanning actions work (iOS)

Hi there. I've tried to use your plugin example to get the barcode scanning working.

Steps to Reproduce

I downloaded the package, did a flutter packages get and replaced line 60 with the following:

...
                controller =
                    new CameraController(newValue, ResolutionPreset.high, OptionsAndEventTestClass.options);
                await controller.initialize();
...

I made a class, OptionsAndEventTestClass that returns the options that the controller asks for (from reading the camera.dart file and reverse-engineering it):

import 'package:flutter/material.dart';
import 'package:vision_camera/vision_camera.dart';

class OptionsAndEventTestClass{

  static Map<String, String> get event {
    final Map<String, String> event = <String, String>{};
    event['eventType'] = 'barcodes';
    return event;
  }

  static Map get options {
    final Map<String, Function> options = <String, Function>{};
    options['onBarcodeRead'] = (Iterable<Barcode> barcodes) => barcodes.forEach(
        (Barcode barcode) => debugPrint(
            'BARCODE\n toString:\t${barcode.toString()}\n rawValue:\t${barcode.rawValue}\n format:\t${barcode.format}'));
    return options;
  }
}

Problem

When I run the app, I can see my front- and back-facing cameras. Activating either and taking pictures works, but whenever I put it in front of a QR- or barcode, it doesn't trigger my callback. When breakpointing on the _listener() function in the camera.dart package, it never gets triggered.

Am I doing something wrong or is this package broken, perhaps?

I need this package (or something similar) for an app that I'm building for a startup, so a quick response would be greatly appreciated.

Thank you in advance.

Best, Jeroen.

Files

The /lib for the example.

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.