bigship / barcode.flutter Goto Github PK
View Code? Open in Web Editor NEWbarcode generate library for Flutter
License: BSD 2-Clause "Simplified" License
barcode generate library for Flutter
License: BSD 2-Clause "Simplified" License
Code128 value 102 pattern is defined as 0x7a2
, but it is actually 0x7ae
.
As a result, an incorrect barcode is output when FNC1 is output or when the check digit result is 102.
In _drawBarCodeEAN8
checkCode is computed like
checkCode = 10 - (sum2nd*3+sum3rd) % 10;
If sum in bracets = 0, then checkCode will be 10, then it will throw.
Algorithm should be like analogue to current EAN13 or UPC,
if ((sum2nd + sum3rd * 3) % 10 == 0) {
checkCode = 0;
} else {
checkCode = 10 - (sum2nd + sum3rd * 3) % 10;
}
I could not google standard for this. only resources like this
@sooxiaotong FittedBox does not help with this. I've attached a screenshot to show that the barcode width is larger than the width computed by the package. And I am also generationg barcode for code128. I know the _calcCanvasWIdth() should be modified but I would have to invest some time to figure out how to do it.
Anyway, I was hoping the author would provide some direct help. Thanks.
Originally posted by @kaciula in #1 (comment)
I feel like Code128 character set is always the same.
Since the barcode it displayed is not like the original barcode.
Hi!
I try to display an EAN-8 barcode with value '90311130'.
But I get an exception 'RangeError (index): Invalid value: Not in range 0..9, inclusive: 10'
return Center( child: Container( child: BarCodeImage( data: '90311130', codeType: BarCodeType.CodeEAN8, barHeight: 100.0, hasText: true, onError: (error) { print("Generate barcode failed. error msg: $error"); }, ), ));
Exception:
════════ Exception caught by rendering library ═════════════════════════════════
The following RangeError was thrown during paint():
RangeError (index): Invalid value: Not in range 0..9, inclusive: 10
User-created ancestor of the error-causing widget was
BarCodeImage
lib/pages/mobil_cards.dart:392
When the exception was thrown, this was the stack
#0 List.[] (dart:core-patch/growable_array.dart:147:60)
#1 BarCodePainter._drawBarCodeEAN8
package:barcode_flutter/src/barcode_painter.dart:574
#2 BarCodePainter.paint
package:barcode_flutter/src/barcode_painter.dart:30
#3 RenderCustomPaint._paintWithPainter
package:flutter/…/rendering/custom_paint.dart:528
#4 RenderCustomPaint.paint
package:flutter/…/rendering/custom_paint.dart:566
...
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#74661
RenderObject: RenderCustomPaint#74661
parentData: offset=Offset(5.0, 5.0) (can use size)
constraints: BoxConstraints(w=152.0, h=98.0)
size: Size(152.0, 98.0)
════════════════════════════════════════════════════════════════════════════════
I want to a function to enlarge the two-dimensional code picture, so i need to get the two-dimensional code picture object. How can I get it
The checksum calculations do not roll the weighting values, they just get bigger.
Weighting for "C" checksum should be 1..20 1..20 1..20 etc
Weighting for "K" checksum should be 1..15 1..15 1..15 etc
see http://www.barcodeisland.com/code93.phtml
Hello, How can I define the library to just scan barcode, I don't need scan QR in my project.
Compare the following two barcode images.
The first is identical to that produced by several on-line barcode generators and matches the specification for code93 in wikipedia,
The second is from this package.
The package generated barcode has two extra solid bars and three extra spaces.
In all other respects, they are identical and both versions scan successfully.
This is not the same as #15. That was a miscalculation of the canvas size required to paint the barcode value with the specified line width.
This issue occurs when the barcode widget is contained by a widget that is smaller than the calculated canvas size. In the example below, the barcode is in an Expanded widget between two SizedBox widgets. The code snippet below shows how the border around the canvas is applied.
return Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.red,
),
child: BarCodeImage(
data: "62733538535715976",
codeType: BarCodeType.Code39,
lineWidth: 2.5,
barHeight: 150.0,
),
);
So, rather than this, it would be better if the painter was aware of the actual width of canvas it has to work with and, if the canvas is too small, scale the barcode line width accordingly.
There are two issues.
Hi, flutter 2.0 was landed and null safety is stable. Do you have any plan to migrate barcode_flutter to null safety?
Hello as title suggest we need the support to the itf and codabar format.
I need to add to an image ('package: image / image.dart') how can I do it?
Just that, foregroundColor doesn't work, is always been show in black
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.