Comments (8)
I now figured out, that it is possible to read barcodes in landscape mode on the Huawei Mate 8. Though i need it to read barcodes on either portrait, or landscape.
from flutter_barcode_reader.
Here is a link to the underlying explanation: https://github.com/dm77/barcodescanner#advanced-usage
from flutter_barcode_reader.
@matthewtsmith is there a way to pass arguemnts to the underlying implementation?
from flutter_barcode_reader.
@vuchl We would need to add that support to the Dart API and pass it through the plugin channel. I don't currently have the time to add this but it should be a relatively easy feature to add if anyone is willing to take a crack at doing a PR.
from flutter_barcode_reader.
Is there some resource for what you are talking about? @matthewtsmith
from flutter_barcode_reader.
There is a write up of how to use channels here: https://flutter.io/platform-channels/
My suggestion would be to add a ScanOptions class that gets passed into the scan
method.
https://github.com/apptreesoftware/flutter_barcode_reader/blob/master/lib/barcode_scan.dart
Something like
class ScanOptions {
bool flash;
bool autoFocus;
double aspectTolerance;
}
Then you would modify the scan
method to accept those arguments.
BarcodeScanner.scan(ScanOptions(apsectTolerance: 0.5))
You would read in those options in the Kotlin and Objective-C code which you can see examples of in that guide.
Here are the relevant areas of code to start with in the native code:
ObjC:
the class MethodCall
has arguments
that you can pull out anything you pass into it.
from flutter_barcode_reader.
I started a fork and toyed around a bit here: https://github.com/vuchl/flutter_barcode_reader/commits/master
But I have just made the edits in GitHub. I'll see if I can get this to work on PC at home. Unfortunately I can not check the iOS specific stuff and I am not sure if it would actually be needed at all.
from flutter_barcode_reader.
https://pub.dev/packages/barcode_scan/versions/3.0.0-dev.1
from flutter_barcode_reader.
Related Issues (20)
- [Question] Can we remove the scanning box from the center of the screen? HOT 1
- [Bug] Camera Permission HOT 2
- Execution failed for task ':barcode_scan:extractIncludeDebugProto'. [Bug]
- [Bug] build warnings: [unchecked] unchecked conversion and unchecked call
- [Feature Request] HOT 2
- How to customize Scanner UI? HOT 1
- [Bug] Making the library size become 0.45MB, instead of the current 4.5MB using a simple refactor
- [Feature Request] HOT 1
- What is minimum api level of android support in flutter_barcode_reader ? HOT 1
- there are so many following errors repeatly
- [Feature Request] Camera selection improvement
- [Bug]Should not store rootViewController of window at plugin register
- [Bug]Can't build project by XCode 12 (after update) HOT 1
- []how to handle access denied finding property vendor.camera.aux.packagelist
- Not detecting PDF417 barcode on Android. In iOS, PDF417 barcode reading is slow..[Bug] HOT 1
- [Bug]
- [Bug] Not detected barcode in Andorid, (ios work) HOT 1
- [Feature Request] Continuous Scan Mode HOT 1
- App crashing when build for release HOT 1
- Warnings unchecked or unsafe
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_barcode_reader.