Flutter plugin for scanning and generating QR codes using the ZXing library, supporting Android, iOS, and desktop platforms
flutterbarcode-generatorbarcode-scannergeneratorqrqrcodeqrcode-generatorqrcode-scannerscannerzxingbarcodezxscanner
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
485 B
14 lines
485 B
3 years ago
|
part of 'zxing.dart';
|
||
|
|
||
|
// Reads barcodes from Uint8List image bytes
|
||
|
List<CodeResult> readBarcodes(Uint8List bytes, int format, int width,
|
||
|
int height, int cropWidth, int cropHeight) {
|
||
|
final CodeResults result = bindings.readBarcodes(
|
||
|
bytes.allocatePointer(), format, width, height, cropWidth, cropHeight);
|
||
|
final List<CodeResult> results = <CodeResult>[];
|
||
|
for (int i = 0; i < result.count; i++) {
|
||
|
results.add(result.results.elementAt(i).ref);
|
||
|
}
|
||
|
return results;
|
||
|
}
|